'Declaration Public Overridable Property SortStyle As ValueListSortStyle
public virtual ValueListSortStyle SortStyle {get; set;}
This property is used to alphabetically sort the valuelistitems in a valuelist.
Valuelistitems are sorted based on their display text, which is set by the DisplayText property, not their data value.
When valuelistitems are sorted, their order in the ValueListItems collection does not actually change, only the order in which they are displayed to the user.
Imports Infragistics.Win Private Sub CreateValueList() Dim list As ValueList = New ValueList() list.ValueListItems.Add(1, "One") list.ValueListItems.Add(2, "Two") list.ValueListItems.Add(3, "Three") list.ValueListItems.Add(4, "Four") list.Appearance.BackColor = Color.Green list.SelectedIndex = 2 list.SortStyle = ValueListSortStyle.AscendingByValue Me.UltraGrid1.DisplayLayout.Bands(0).Columns(0).ValueList = list Me.UltraGrid1.DisplayLayout.Bands(0).Columns(0).Style = UltraWinGrid.ColumnStyle.DropDownList End Sub
using Infragistics.Win; private void CreateValueList() { ValueList list = new ValueList(); list.ValueListItems.Add(1,"One"); list.ValueListItems.Add(2,"Two"); list.ValueListItems.Add(3,"Three"); list.ValueListItems.Add(4,"Four"); list.Appearance.BackColor = Color.Green; list.SelectedIndex = 2; list.SortStyle = ValueListSortStyle.AscendingByValue ; this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].ValueList = list; this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Style = UltraWinGrid.ColumnStyle.DropDownList ; }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2