Skip to main content

BootstrapListBox Class

In This Article
Methods

#Declaration

TypeScript
class BootstrapListBox extends BootstrapClientEdit

#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.

#Methods

#addItem(text) Method

#Declaration

TypeScript
addItem(
    text: string
): number

#Parameters

Name Type
text string

#Returns

Type
number

#addItem(text, value) Method

#Declaration

TypeScript
addItem(
    text: string,
    value: any
): number

#Parameters

Name Type
text string
value any

#Returns

Type
number

#addItem(text, value, iconCssClass) Method

#Declaration

TypeScript
addItem(
    text: string,
    value: any,
    iconCssClass: string
): number

#Parameters

Name Type
text string
value any
iconCssClass string

#Returns

Type
number

#addItem(texts) Method

#Declaration

TypeScript
addItem(
    texts: string[]
): number

#Parameters

Name Type
texts string[]

#Returns

Type
number

#addItem(texts, value) Method

#Declaration

TypeScript
addItem(
    texts: string[],
    value: any
): number

#Parameters

Name Type
texts string[]
value any

#Returns

Type
number

#addItem(texts, value, iconCssClass) Method

#Declaration

TypeScript
addItem(
    texts: string[],
    value: any,
    iconCssClass: string
): number

#Parameters

Name Type
texts string[]
value any
iconCssClass string

#Returns

Type
number

#addItemCssClass(index, className) Method

#Declaration

TypeScript
addItemCssClass(
    index: number,
    className: string
): void

#Parameters

Name Type
index number
className string

#addItemTextCellCssClass(itemIndex, textCellIndex, className) Method

#Declaration

TypeScript
addItemTextCellCssClass(
    itemIndex: number,
    textCellIndex: number,
    className: string
): void

#Parameters

Name Type
itemIndex number
textCellIndex number
className string

#beginUpdate Method

#Declaration

TypeScript
beginUpdate(): void

#clearItems Method

#Declaration

TypeScript
clearItems(): void

#endUpdate Method

#Declaration

TypeScript
endUpdate(): void

#findItemByText(text) Method

#Declaration

TypeScript
findItemByText(
    text: string
): BootstrapListBoxItem | null

#Parameters

Name Type
text string

#Returns

Type
BootstrapListBoxItem
null

#findItemByValue(value) Method

#Declaration

TypeScript
findItemByValue(
    value: any
): BootstrapListBoxItem | null

#Parameters

Name Type
value any

#Returns

Type
BootstrapListBoxItem
null

#getItem(index) Method

#Declaration

TypeScript
getItem(
    index: number
): BootstrapListBoxItem | null

#Parameters

Name Type
index number

#Returns

Type
BootstrapListBoxItem
null

#getItemBadgeIconCssClass(index) Method

#Declaration

TypeScript
getItemBadgeIconCssClass(
    index: number
): string

#Parameters

Name Type
index number

#Returns

Type
string

#getItemBadgeText(index) Method

#Declaration

TypeScript
getItemBadgeText(
    index: number
): string

#Parameters

Name Type
index number

#Returns

Type
string

#getItemCount Method

#Declaration

TypeScript
getItemCount(): number

#Returns

Type
number

#getSelectedIndex Method

#Declaration

TypeScript
getSelectedIndex(): number

#Returns

Type
number

#getSelectedIndices Method

#Declaration

TypeScript
getSelectedIndices(): number[]

#Returns

Type
number[]

#getSelectedItem Method

#Declaration

TypeScript
getSelectedItem(): BootstrapListBoxItem | null

#Returns

Type
BootstrapListBoxItem
null

#getSelectedItems Method

#Declaration

TypeScript
getSelectedItems(): BootstrapListBoxItem[]

#Returns

Type
BootstrapListBoxItem[]

#getSelectedValues Method

#Declaration

TypeScript
getSelectedValues(): any[]

#Returns

Type
any[]

#insertItem(index, text) Method

#Declaration

TypeScript
insertItem(
    index: number,
    text: string
): void

#Parameters

Name Type
index number
text string

#insertItem(index, text, value) Method

#Declaration

TypeScript
insertItem(
    index: number,
    text: string,
    value: any
): void

#Parameters

Name Type
index number
text string
value any

#insertItem(index, text, value, iconCssClass) Method

#Declaration

TypeScript
insertItem(
    index: number,
    text: string,
    value: any,
    iconCssClass: string
): void

#Parameters

Name Type
index number
text string
value any
iconCssClass string

#insertItem(index, texts) Method

#Declaration

TypeScript
insertItem(
    index: number,
    texts: string[]
): void

#Parameters

Name Type
index number
texts string[]

#insertItem(index, texts, value) Method

#Declaration

TypeScript
insertItem(
    index: number,
    texts: string[],
    value: any
): void

#Parameters

Name Type
index number
texts string[]
value any

#insertItem(index, texts, value, iconCssClass) Method

#Declaration

TypeScript
insertItem(
    index: number,
    texts: string[],
    value: any,
    iconCssClass: string
): void

#Parameters

Name Type
index number
texts string[]
value any
iconCssClass string

#makeItemVisible(index) Method

#Declaration

TypeScript
makeItemVisible(
    index: number
): void

#Parameters

Name Type
index number

#off<K> Method

#Declaration

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

#Parameters

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

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#on<K>(eventName, callback) Method

#Declaration

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

#Parameters

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

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#once<K>(eventName, callback) Method

#Declaration

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

#Parameters

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

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#performCallback(data) Method

#Declaration

TypeScript
performCallback(
    data: any
): Promise<void>

#Parameters

Name Type
data any

#Returns

Type
Promise<void>

#performCallback(data, onSuccess) Method

#Declaration

TypeScript
performCallback(
    data: any,
    onSuccess: () => void
): void

#Parameters

Name Type
data any
onSuccess () => void

#removeItem(index) Method

#Declaration

TypeScript
removeItem(
    index: number
): void

#Parameters

Name Type
index number

#removeItemCssClass(index, className) Method

#Declaration

TypeScript
removeItemCssClass(
    index: number,
    className: string
): void

#Parameters

Name Type
index number
className string

#removeItemTextCellCssClass(itemIndex, textCellIndex, className) Method

#Declaration

TypeScript
removeItemTextCellCssClass(
    itemIndex: number,
    textCellIndex: number,
    className: string
): void

#Parameters

Name Type
itemIndex number
textCellIndex number
className string

#selectAll Method

#Declaration

TypeScript
selectAll(): void

#selectIndices(indices) Method

#Declaration

TypeScript
selectIndices(
    indices: number[]
): void

#Parameters

Name Type
indices number[]

#selectItems(items) Method

#Declaration

TypeScript
selectItems(
    items: BootstrapListBoxItem[]
): void

#Parameters

Name Type
items BootstrapListBoxItem[]

#selectValues(values) Method

#Declaration

TypeScript
selectValues(
    values: any[]
): void

#Parameters

Name Type
values any[]

#setItemBadgeIconCssClass(index, cssClass) Method

#Declaration

TypeScript
setItemBadgeIconCssClass(
    index: number,
    cssClass: string
): void

#Parameters

Name Type
index number
cssClass string

#setItemBadgeText(index, text) Method

#Declaration

TypeScript
setItemBadgeText(
    index: number,
    text: string
): void

#Parameters

Name Type
index number
text string

#setItemHtml(index, html) Method

#Declaration

TypeScript
setItemHtml(
    index: number,
    html: string
): void

#Parameters

Name Type
index number
html string

#setItemTextCellHtml(itemIndex, textCellIndex, html) Method

#Declaration

TypeScript
setItemTextCellHtml(
    itemIndex: number,
    textCellIndex: number,
    html: string
): void

#Parameters

Name Type
itemIndex number
textCellIndex number
html string

#setItemTextCellTooltip(itemIndex, textCellIndex, tooltip) Method

#Declaration

TypeScript
setItemTextCellTooltip(
    itemIndex: number,
    textCellIndex: number,
    tooltip: string
): void

#Parameters

Name Type
itemIndex number
textCellIndex number
tooltip string

#setItemTooltip(index, tooltip) Method

#Declaration

TypeScript
setItemTooltip(
    index: number,
    tooltip: string
): void

#Parameters

Name Type
index number
tooltip string

#setSelectedIndex(index) Method

#Declaration

TypeScript
setSelectedIndex(
    index: number
): void

#Parameters

Name Type
index number

#setSelectedItem(item) Method

#Declaration

TypeScript
setSelectedItem(
    item: BootstrapListBoxItem
): void

#Parameters

Name Type
item BootstrapListBoxItem

#unselectAll Method

#Declaration

TypeScript
unselectAll(): void

#unselectIndices(indices) Method

#Declaration

TypeScript
unselectIndices(
    indices: number[]
): void

#Parameters

Name Type
indices number[]

#unselectItems(items) Method

#Declaration

TypeScript
unselectItems(
    items: BootstrapListBoxItem[]
): void

#Parameters

Name Type
items BootstrapListBoxItem[]

#unselectValues(values) Method

#Declaration

TypeScript
unselectValues(
    values: any[]
): void

#Parameters

Name Type
values any[]