ValueList would be a list of values that Warehouse could take but will not set the value of warehouse.
If you are trying to set the value for the warehouse you need to work with an actual row, the code you are working with would affect the column's behavior.
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["warehouse"].ValueList = list;
this.ultraGrid1.DisplayLayout.Bands[0].Columns["warehouse"].Style = UltraWinGrid.ColumnStyle.DropDownList ;
}
Jim Kinneman
Encompass Solutions, Inc
If you are trying to set the value for the warehouse you need to work with an actual row, the code you are working with would affect the column's behavior.
dataGridView1.Rows[RowIwantToChange].Cells["Warehouse"].Value = "NONSTOCK";
To change the values IN valuelist which would be used for the columnprivate 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["warehouse"].ValueList = list;
this.ultraGrid1.DisplayLayout.Bands[0].Columns["warehouse"].Style = UltraWinGrid.ColumnStyle.DropDownList ;
}
Jim Kinneman
Encompass Solutions, Inc