ASPxComboBox.SelectedIndexChanged Event
Fires when the user changes the selection.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Event Data
The SelectedIndexChanged event's data class is EventArgs.
Remarks
The editor handles the selection change on the server and raises the SelectedIndexChanged event in the following cases:
- The ASPxEdit.AutoPostBack property is set to
true
. - The ASPxClientComboBox.SelectedIndexChanged event’s processOnServer argument is set to
true
.
<dx:ASPxTextBox ID="ASPxTextBox1" runat="server" Text="Choose the country"></dx:ASPxTextBox>
<dx:ASPxComboBox ID="ASPxComboBox1" runat="server" OnSelectedIndexChanged="ASPxComboBox1_SelectedIndexChanged">
<Items>
<dx:ListEditItem Text="Afghanistan" Value="1" />
<!--...-->
</Items>
<ClientSideEvents SelectedIndexChanged="function(s, e) { e.processOnServer=true; }" />
</dx:ASPxComboBox>
protected void ASPxComboBox1_SelectedIndexChanged(object sender, EventArgs e){
ASPxComboBox comboBox = (ASPxComboBox)sender;
ASPxTextBox1.Text = comboBox.SelectedItem.ToString();
}
See Also