Skip to main content

BootstrapTreeView Class

#Declaration

TypeScript
class BootstrapTreeView 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
BootstrapTreeView

#Methods

#collapseAll Method

#Declaration

TypeScript
collapseAll(): void

#expandAll Method

#Declaration

TypeScript
expandAll(): void

#getNode(index) Method

#Declaration

TypeScript
getNode(
    index: number
): BootstrapTreeViewNode | null

#Parameters

Name Type
index number

#Returns

Type
BootstrapTreeViewNode
null

#getNodeByName(name) Method

#Declaration

TypeScript
getNodeByName(
    name: string
): BootstrapTreeViewNode | null

#Parameters

Name Type
name string

#Returns

Type
BootstrapTreeViewNode
null

#getNodeByText(text) Method

#Declaration

TypeScript
getNodeByText(
    text: string
): BootstrapTreeViewNode | null

#Parameters

Name Type
text string

#Returns

Type
BootstrapTreeViewNode
null

#getNodeCount Method

#Declaration

TypeScript
getNodeCount(): number

#Returns

Type
number

#getRootNode Method

#Declaration

TypeScript
getRootNode(): BootstrapTreeViewNode | null

#Returns

Type
BootstrapTreeViewNode
null

#getSelectedNode Method

#Declaration

TypeScript
getSelectedNode(): BootstrapTreeViewNode | null

#Returns

Type
BootstrapTreeViewNode
null

#off<K> Method

#Declaration

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

#Parameters

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

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#on<K>(eventName, callback) Method

#Declaration

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

#Parameters

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

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#once<K>(eventName, callback) Method

#Declaration

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

#Parameters

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

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#setSelectedNode(node) Method

#Declaration

TypeScript
setSelectedNode(
    node: BootstrapTreeViewNode
): void

#Parameters

Name Type
node BootstrapTreeViewNode