Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
WinGridCell - Set the index of the ValueList on RowInsert
posted

Hi, 

I am wondering how I can set the index of a ValueList that is assigned to a WinGridCell.

For example I've assigned a list to the cell at the InitialiseLayout event


grid.DisplayLayout.Bands[0].Columns["ColumnName"].ValueList = ValueList object.


Which is all well and good.


So basically when a user goes to enter a new row, I want to set the SelectedIndex of that valuelist in the cell to 0.

I have tried,


private void grid_AfterRowInsert(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs e)
{

try
{

switch (e.Row.Band.Index)
{
case 0:

 e.Row.Cells["ColumnName"].ValueList.SelectedItemIndex = 0;


}


}...

But this errors by saying the ValueList is NULL, but as you see, I've assigned the ValueList at the InitialiseLayout event. 

Any help would be good. 

Thanks

Chris   

Parents Reply Children
No Data