Hi,
i have a UltraWinGrid with one dropdonwlist-column containing a ValueList with items in different colors.
I have used the Designer to fill the ValueList ;-).
Now i want to change the row selector appearence depending on the color of the current selected ValueListItem.
My not working solution looks like this:
this.grdSalesUntis.CellChange += (sender, args) => { var cell = args.Cell; if (cell == args.Cell.Row.Cells[SalesUnitMetadata.PropertyNames.OppStatus]) { var item = cell.ValueListResolved.SelectedItemIndex; var listItem = ????????; var appereance = listItem.Appearance; } };
Where can i get the ValuListItem object with all properties?
Thanks for your help!
Stephan
Sometimes thinking about helps ;-)
this.grdSalesUntis.CellChange += (sender, args) => { var cell = args.Cell; if (cell == args.Cell.Row.Cells[SalesUnitMetadata.PropertyNames.OppStatus]) { var item = cell.ValueListResolved.SelectedItemIndex; var lists = grdSalesUntis.DisplayLayout.ValueLists; var myList = lists["OppStatus"]; var listItem = myList.ValueListItems[item]; var appereance = listItem.Appearance; cell.Row.RowSelectorAppearance.BackColor = appereance.BackColor; } };
Hello Sbomholt,
Thank you for sharing your solution with the Infragistics Community.
Please do not hesitate to write in the forums when you have any questions.
Thanks.