This is a migrated thread and some comments may be shown as answers.

RadComboBox set selected index client side

1 Answer 1105 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
mike
Top achievements
Rank 1
mike asked on 17 Aug 2010, 12:10 AM
How can i set the selected index of a combobox in javascript.

eg: i wish to set the index to the first option upon when a check box is unchecked.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Aug 2010, 06:12 AM
Hi Mike,


The following code snippet shows how to select the first item in radcombobox from client side.

Client code:
function setSelectedIndex() {
    var combo = $find("<%= RadComboBox1.ClientID %>");
    combo.trackChanges();
    combo.get_items().getItem(0).select();
    combo.updateClientState();
    combo.commitChanges();
}

To know more:
RadComboBox object



-Shinu.
Tags
ComboBox
Asked by
mike
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or