The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientListEdit.SetSelectedItem(item) Method

Sets the list editor's selected item.


SetSelectedItem(item: ASPxClientListEditItem): void


Name Type Description
item ASPxClientListEditItem

An ASPxClientListEditItem object that specifies the item to select.


Use the SetSelectedItem method on the client side to specify the selected item within the list editor. If a null value is passed as the parameter, no item will be selected within the editor.


<dx:ASPxListBox ID="ASPxListBox1" runat="server" ClientInstanceName="listBox" >
        <dx:ListEditItem Text="Item 10" Value="10" />
        <dx:ListEditItem Text="Item 20" Value="20" />
        <dx:ListEditItem Text="Item 30" Value="30" />
        <dx:ListEditItem Text="Item 40" Value="40" />

<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Select Item" AutoPostBack="False">
    <ClientSideEvents Click="function(s, e) {
        var item = listBox.FindItemByValue('20');
    }" />
See Also