Welcome Guest Search | Active Topics | Sign In | Register

SelectedValue in a Grid cell's dropdownlist Options
DiscoverSoft
Posted: Sunday, April 11, 2010 6:28:49 PM
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
eo_support
Posted: Sunday, April 11, 2010 8:23:28 PM
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
DiscoverSoft
Posted: Monday, April 12, 2010 9:49:34 AM
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?
eo_support
Posted: Monday, April 12, 2010 1:04:07 PM
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.