ASP.NET ListBox - Documentation - Client-Side API

<%@ Register TagPrefix="obout" Namespace="Obout.ListBox" Assembly="obout_ListBox" %>

Client-Side Methods

Name Description
propertyvalue Gets or sets the selected value.

var val = ListBox1.value(); ListBox1.value(newValue);
propertyselectedIndex Gets or sets the selected index.

var index = ListBox1.selectedIndex(); ListBox1.selectedIndex(newIndex);
propertyfocus Moves the focus to the ListBox control.

ListBox1.focus();
propertyenable Enables the ListBox control.

ListBox1.enable();
propertydisable Disables the ListBox control.

ListBox1.disable();
propertygetItemByIndex Gets the HTML element representing an item, based on its index.

var item = ListBox1.getItemByIndex(3);

Items

Name Description
propertyoptions A collection containing all the items from the ListBox control.

ListBox1.options
propertylength The total number of items from the ListBox control.

for(var i=0; i<ListBox1.options.length; i++) { ... }
propertyvalue The value of a specific item.

alert(ListBox1.options[index].value);
propertytext The text of a specific item.

alert(ListBox1.options[index].text);
propertyadd Adds a new item to the list, at a specific position.
If "index" is not specified, the item will be added at the end of the list.

ListBox1.options.add(text, value[, index]);
propertyremove Removes a specific item, based on its index.

ListBox1.options.remove(index);
propertyclear Removes all the items from the list.

ListBox1.options.clear();
obout.com 
obout.com Home 
News 
ListBox Home   
ListBox Home 
Examples - 56
Appearance - 2 
Live Styles 
Different Styles New 
Load on Demand - 3 
Load Items on Demand 
Load Items on Demand with Paging  
Virtual Scrolling  
Multi-Columns - 5 
Grid-like Multi-Columns  
Grid-like Multi-Columns & Tooltips New 
Multiple Rows and Columns  
Load multi Columns on Demand  
State Selector  
Items with Icons - 4 
Items with Icons  
Grid-like Multi-Columns with Icons  
Multiple Rows and Columns with Icons  
Icons from Database New 
Templates - 4 
Item Templates  
Header Templates  
Dynamic Header Templates New 
Populating with Data - 5 
Declarative  
SqlDataSource  
ObjectDataSource  
Generic Collections  
DataSet  
Item Selection - 6 
Single Item Selection  
Multi Item Selection  
Get Selected Item  
Get Selected Items  
Set Selected Item New 
Set Selected Items New 
Master/Detail - 3 
Master/Detail  
Unlimited Detail Levels  
Cascading ListBoxes  
Integration - 8 
Items with ASP.NET CheckBoxes  
Items with Obout CheckBoxes  
Select All ASP.NET CheckBoxes New 
Select All Obout CheckBoxes New 
CheckBoxes on Multiple Columns New 
RadioButtons inside ListBox  
ListBox inside Grid  
Validate with ASP.NET Validators New 
Settings - 3 
AutoPostback  
Height  
Width  
Server-Side API - 4 
Server-Side Events  
Enable / Disable  
Get Values from Multiple Columns New 
Tooltips New 
Client-Side API - 8 
Client-Side Events  
Add / Remove Items  
Add Multi-Column Items New 
Enable / Disable  
Get Selected Item  
Reset Selection New 
Select / Deselect All Items New 
Move Items New 
Appearance Customization - 1 
Aligning Items New 
Knowledge Base - 1 
Knowledge Base 
Documentation - 11 
Server-Side 
ListBox 
ListBoxClientSideEvents 
ComboBoxCssSettings 
ListBoxFooterTemlateContainer 
ListBoxHeaderTemlateContainer 
ListBoxItem 
ListBoxItemEventArgs 
ListBoxItemTemlateContainer 
ListBoxLoadingItemsEventArgs 
Client-Side 
Client-Side API 
ChangeLog 
Tutorials - 2 
Appearance - 1 
CSS Tutorial  
Configuration - 1 
Using the correct path