Hi,
I have a requirement where in a certain column user should be able to select some values from a list. My approach is to have a column that has a dropdownlist style. When popup I want a checkedlistbox to be displayed where user can select some of many items of type KeyValuePair(string, string).
In the cell itself I wand the list of selected keys to be stored, but in the front end i want the list of Values to be displayed.
Can this be done using UltraWinGrid?
Do you have a quickstart how I could achieve this?
Kind regards
Patrick
Hi Mike,
sorry but the doing with comboeditor is ok and it works as expected. But I can not see how the grid cell could handle displaytext and datavalues.
I'm a bit lost.
Patrick Jox said:In the ComboEditor there is a bound list with key and value. Value is displayed during dropdown. After closeup a list of values is displayed in grid cell. BUT the bound object has got the list of keys not values.
This is exactly what should happen if you follow my directions above. The whole point of having a DataValue and a DisplayText on the ValueList item is so you can display one thing to the users (DisplayText) but save something else to your data source (DataValue), like a key.
You do not need to handle any events for this.
Not right!!!!
Tried this out now but I do not get the AfterCloseUp-Event when the ComboEditor is used within the grid cell. I only get it when it is used standalone.
Do I have any chance to receive the AfterCloseUp-Event?
optimal solution would be the following szenario.
In the ComboEditor there is a bound list with key and value. Value is displayed during dropdown. After closeup a list of values is displayed in grid cell. BUT the bound object has got the list of keys not values.
I think this is do be done manually during AfterCloseUp event. Right?
Hi Patrick,
Patrick Jox said:After CloseUp or leaving the cell I can see the selected items value in my gridcell. This could be enough but I would prefer to see the keys instead of values. Is this possible.
If you want to see the key, then you should not be setting the DisplayMember to "Value". It should be set to "Key" or nothing at all. In the latter case, it will fall back to the ValueMember, which is already "Key" in your sample code.