ValueListItems Property

Returns a reference to a ValueListItems collection, containing the valustlistitems of a ValueList object. This property is read-only at run-time.
Public ReadOnly Property ValueListItems As ValueListItemsCollection
public ValueListItemsCollection ValueListItems {get;}

This property returns a reference to a ValueList collection that can be used to retrieve references to the ValueListItem objects that are contained by the valuelist. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.

A reference to a ValueList object for a column can be obtained from the column's ValueList property. Valuelistitems can be added to or removed from a ValueList object by invoking its Add and Remove methods, respectively.

This sample creates a valuelist with four items. It initializes its appearance and selected index, sorts it by dataValue, and assigns it to the first column of the grid.

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.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

See Also