ComboBoxSettings.SelectedIndex Property
Gets or sets the selected list item’s index.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Property Value
Type | Description |
---|---|
Int32 | An integer value, representing the zero-based index of the selected list item. |
Remarks
Use the SelectedIndex property to control selection within the ComboBox editor. The default value specifies that no item is selected within the editor.
Html.DevExpress().ComboBox(
settings => {
settings.Name = "comboBox1";
settings.Width = 180;
settings.SelectedIndex = 0;
settings.Properties.DisplayFormatString = "DXp v. {0}";
settings.Properties.ValueType = typeof(string);
settings.Properties.Items.Add("2009.3");
settings.Properties.Items.Add("2010.1");
settings.Properties.Items.Add("2010.2");
}
).GetHtml();
See Also