Skip to main content

ASPxListEdit.SelectedIndex Property

Gets or sets the selected list item’s index.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


public int SelectedIndex { get; set; }

Property Value

Type Default Description
Int32 -1

An integer value, representing the zero-based index of the selected list item.


Use the SelectedIndex property to move selection within the list editor. The default value specifies that no item is selected within the list editor. You can also change the selected item via the ASPxListEdit.SelectedItem property.

Handle the ASPxListEdit.SelectedIndexChanged event to respond to the selection being changed within the list editor.


This example demonstrates how the ASPxSpinEdit‘s decimal separator is automatically changed upon selecting a culture.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<script runat="server">
     protected void Page_Load(object sender, EventArgs e) {
         ASPxRadioButtonList1.SelectedIndex = GetCulture() == "en-US" ? 0 : 1;
     protected override void InitializeCulture() {
         CultureInfo ci = new CultureInfo(GetCulture(), true);
         System.Threading.Thread.CurrentThread.CurrentCulture = ci;
         System.Threading.Thread.CurrentThread.CurrentUICulture = ci;
     private string GetCulture() {
         string culture = "en-US";
         if (!string.IsNullOrEmpty(Page.Request.Params["culture"]))
             culture = Page.Request.Params["culture"];
         int comma = culture.IndexOf(",");
         if (comma != -1)
             culture = culture.Remove(comma);
         return culture;

 <html xmlns="" >
 <head id="Head1" runat="server">
     <title>Support for Different Cultures</title>
     <form id="form1" runat="server">
         <asp:Label ID="Label1" runat="server" Text="Culture: " 
         <dxe:ASPxRadioButtonList ID="ASPxRadioButtonList1" runat="server" SelectedIndex="0">
                 <dxe:ListEditItem Text="English (USA)" Value="en-US" />
                 <dxe:ListEditItem Text="Italian" Value="it-IT" />
             <ClientSideEvents SelectedIndexChanged="function(s, e) {
     document.location.href = "?culture=" + s.GetSelectedItem().value;
 }" />
         <dxe:ASPxSpinEdit ID="ASPxSpinEdit1" runat="server" Number="0.1" />
See Also