Hi,
Is there such a property in the WinGrid?
I'm supplying my datasource at runtime, and even though I've created the schema, columns that I did not include just showed up on my UltraGrid, is there some setting that I'm missing?
Thanks!
For a simple ValueList like this, it's probably easier to do it at run-time.
But if you want to do this at design-time, what you would do is go to the grid.DisplayLayout.ValueLists collection and add a ValueList there. Be sure to give your ValueList a Key.
Then the ValueList you created will show up on the list for the column's ValueList property.
At run-time, you would do essentially the same thing inside the InitializeLayout event of the grid. Add a ValueList to the e.Layout.ValueLists collection and populate the ValueListItems collection, then assign the ValueList you created to the ValueList property on the column.
How do I set the ValueList?
I went into the designer mode of the grid, under the Band settings. the ValueList property just displayed "none" with no option for me to specify anything.
Is it also possible to dynamically set this ValueList - values/displaytext at runtime?
There are a number of ways to do that. The easiest way would be to use a ValueList. You would populate the ValueList with Values and DisplayText. The values would be 'M' and 'F' and the displaytext of each item would be "male" and "female" respectively.
As in like, if there's a Gender column on my grid, and in my database I just stall char(1) 'M' or 'F'. How do I translate that to "male" or "female" on the grid?