Skip to main content

BootstrapAccordion Class

#Declaration

TypeScript
class BootstrapAccordion extends Control

#Remarks

IMPORTANT

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

#Inheritance

Control
BootstrapAccordion

#Methods

#collapseAll Method

#Declaration

TypeScript
collapseAll(): void

#expandAll Method

#Declaration

TypeScript
expandAll(): void

#getActiveGroup Method

#Declaration

TypeScript
getActiveGroup(): BootstrapAccordionGroup | null

#Returns

Type
BootstrapAccordionGroup
null

#getGroup(index) Method

#Declaration

TypeScript
getGroup(
    index: number
): BootstrapAccordionGroup | null

#Parameters

Name Type
index number

#Returns

Type
BootstrapAccordionGroup
null

#getGroupByName(name) Method

#Declaration

TypeScript
getGroupByName(
    name: string
): BootstrapAccordionGroup | null

#Parameters

Name Type
name string

#Returns

Type
BootstrapAccordionGroup
null

#getGroupCount Method

#Declaration

TypeScript
getGroupCount(): number

#Returns

Type
number

#getItemByName(name) Method

#Declaration

TypeScript
getItemByName(
    name: string
): BootstrapAccordionItem | null

#Parameters

Name Type
name string

#Returns

Type
BootstrapAccordionItem
null

#getSelectedItem Method

#Declaration

TypeScript
getSelectedItem(): BootstrapAccordionItem | null

#Returns

Type
BootstrapAccordionItem
null

#off<K> Method

#Declaration

TypeScript
off<K extends keyof BootstrapAccordionEventMap>(
    eventName?: K,
    callback?: (this: BootstrapAccordion,
    args?: BootstrapAccordionEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapAccordion, args?: BootstrapAccordionEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#on<K>(eventName, callback) Method

#Declaration

TypeScript
on<K extends keyof BootstrapAccordionEventMap>(
    eventName: K,
    callback: (this: BootstrapAccordion,
    args?: BootstrapAccordionEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapAccordion, args?: BootstrapAccordionEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#once<K>(eventName, callback) Method

#Declaration

TypeScript
once<K extends keyof BootstrapAccordionEventMap>(
    eventName: K,
    callback: (this: BootstrapAccordion,
    args?: BootstrapAccordionEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapAccordion, args?: BootstrapAccordionEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#setActiveGroup(group) Method

#Declaration

TypeScript
setActiveGroup(
    group: BootstrapAccordionGroup
): void

#Parameters

Name Type
group BootstrapAccordionGroup

#setSelectedItem(item) Method

#Declaration

TypeScript
setSelectedItem(
    item: BootstrapAccordionItem
): void

#Parameters

Name Type
item BootstrapAccordionItem