Tab
A newer version of this page is available. Switch to the current version.

ASPxComboBox.SelectedIndexChanged Event

Occurs after an end user moves focus from one item to another.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public event EventHandler SelectedIndexChanged
Public Event SelectedIndexChanged As EventHandler

Event Data

The SelectedIndexChanged event's data class is EventArgs.

Remarks

The SelectedIndexChanged event occurs on the server side when an end user moves focus from one item to another. Handle the SelectedIndexChanged event to perform tasks in response to a user action when selecting a different item in the editor's list.

NOTE

The SelectedIndexChanged event's generation depends on the ASPxEdit.AutoPostBack and ASPxClientProcessingModeEventArgs.processOnServer properties passed to the corresponding client ASPxClientComboBox.SelectedIndexChanged event, if it is handled.

Example

WebForms:

<dx:ASPxListBox ID="lbFeatures" runat="server" SelectionMode="CheckColumn" EnableSelectAll="true" Width="285" Height="210"
    DataSourceID="Features" ValueField="ID" ValueType="System.String" TextField="Name" Caption="Phone features">
    <ClientSideEvents SelectedIndexChanged="function(s, e) {lbModels.PerformCallback('1');}" />
</dx:ASPxListBox>

<dx:ASPxListBox ID="lbModels" runat="server" SelectionMode="CheckColumn" EnableSelectAll="true" Width="285" Height="210px"
    ClientInstanceName="lbModels" DataSourceID="PhoneModels" ValueField="ID"
    ValueType="System.String" OnCallback="lbModels_Callback" ...>
    <Columns>
    ...
    </Columns>
</dx:ASPxListBox>

MVC:

@Html.DevExpress().ListBox(settings => {
    settings.Name = "listBox1";
    settings.Properties.SelectionMode = ListEditSelectionMode.CheckColumn;
    ...
    settings.Properties.ClientSideEvents.SelectedIndexChanged = "SelectionChanged";
}).BindList(Model).GetHtml()

@Html.DevExpress().ListBox(settings => {
    settings.Name = "listBox2";
    settings.Properties.EnableClientSideAPI = true;
    settings.Properties.SelectionMode = ListEditSelectionMode.Single;
    ...
}).BindList(Model).GetHtml()

Online Demos

See Also