I'm in the process of converting over janus grids to infragistics grid (UltraWinGrid) and am stuck on a certain part of it. I need to get a list of all unique values for each column. In janus grids, there is a 'ValueList' collection that can be obtained for each column and will give you the list of unique values. In infragitsics, I did find that there is also a 'ValueList', but it does not appear to do what I need. What is the best way of getting a list of all unique value? I have quite a few columns, so it needs to be somewhat efficient. By the way, this is for windows and I'm using VB.netAny help would be appreciated.
To get all UNIQUE values with the rows you have to add a distinct :
grid.Rows.Select ( r => r.GetCellValue(columnName)).Distinct() ;
byeGianni
The value list is for displaying friendly user strings instead of values, like setting a data source to a combobox.
You can loop through the rows and get the values, but you can do it also with the datasource.
With the rows:
grid.Rows.Select(r => r.GetCellValue(columnName))