Back to Devexpress

ASPxListEdit.SelectedIndexChanged Event

aspnet-devexpress-dot-web-dot-aspxlistedit-ded44ba0.md

latest3.5 KB
Original Source

ASPxListEdit.SelectedIndexChanged Event

Occurs after a different item in the list has been selected (focus has been moved from one item to another).

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event EventHandler SelectedIndexChanged
vb
Public Event SelectedIndexChanged As EventHandler

Event Data

The SelectedIndexChanged event's data class is EventArgs.

Remarks

The SelectedIndexChanged event occurs on the server side, whenever selection is moved between items within a list editor. Write a handler for the SelectedIndexChanged event to perform tasks in response to an end user selecting a different item from the editor’s list.

Note

The SelectedIndexChanged event’s generation depends upon the settings of the ASPxEdit.AutoPostBack property and the ASPxClientProcessingModeEventArgs.processOnServer property passed to the corresponding client ASPxClientListEdit.SelectedIndexChanged event, if it is handled. refer to the descriptions of these properties for more information.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectedIndexChanged event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

xaf-how-to-display-a-collection-property-as-a-checked-list-box/CS/DXExample.Module.Web/WebCheckedListBoxPropertyEditor.cs#L34

csharp
ASPxCheckBoxList control = ViewEditMode == DevExpress.ExpressApp.Editors.ViewEditMode.Edit ? Editor : InplaceViewModeEditor;
control.SelectedIndexChanged -= new EventHandler(Control_SelectedIndexChanged);
checkedItems = (XPBaseCollection)PropertyValue;

xaf-how-to-display-a-collection-property-as-a-checked-list-box/VB/DXExample.Module.Web/WebCheckedListBoxPropertyEditor.vb#L34

vb
Dim control As ASPxCheckBoxList = If(ViewEditMode = DevExpress.ExpressApp.Editors.ViewEditMode.Edit, Editor, InplaceViewModeEditor)
RemoveHandler control.SelectedIndexChanged, AddressOf Control_SelectedIndexChanged
checkedItems = CType(PropertyValue, XPBaseCollection)

See Also

ASPxListEdit Class

ASPxListEdit Members

DevExpress.Web Namespace