|
Rank: Advanced Member Groups: Member
Joined: 2/27/2010 Posts: 69
|
I have a CustomColumn with a drop down list that has option values different than the displayed values. But I can't seem to figure out how to get this value once I submit back to the server. When I loop through the grid's AddedItems the cell's value property returns the displayed text, not the option value.
Could you please provide an example of how to get the selectedValue from a dropdownlist in a grid cell?
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Inside your CustomColumn's ClientSideEndEdit handler you should return the option's value instead of its text to the Grid. The Grid takes whatever you return to it from your handler and pass it back to the server. So that's where the value originates.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 2/27/2010 Posts: 69
|
Thanks for your prompt reply. Yes, I had tried setting the return value to the option's value, but that solution changes the text that's displayed to the user. In this case the option value is a linkage key to a LUT and has no meaning to the user, except to confuse them. Isn't there a way to send the option value to the server, yet continue to display the original text from the drop down list for the user?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Of course. The display value is controled by your function (ClientSideGetText) as well. The Grid keeps one value per cell. You decide what value that to be and how to display it.
Thanks
|
|