My Grid has an UltraDropDown in it.
When a user selects a row in my grid, I need to capture the ValueMember for the already populated DisplayMember of the dropdown. How can I do this?
I am using the AfterRowActivate Event in my grid
Many thanksJason
Hi Jason,
It sounds like you should just be reading the Value of the cell in the grid. You don't need to involve the DropDown at all.
I would have thought so too, but I am having a problem
The Grid column itself is databound and has a datatype of String.
The DropDownList in this column opens a list which has 2 columns. An Int for the TradeID and a String for the TradeName to display.
I have set the properties for the DDL to be:
DisplayMember - TradeNameValueMember - TradeID
The Grid has the ValueList set as the DDL.
All is good so far. The user sees the String rather than the Int, however the following line of code only returns the String:
this.grdTradeBreakdown.Rows[IntSelectedRow].Cells[1].Value;
I have also looked at:
this.grdTradeBreakdown.Rows[IntSelectedRow].Cells[1].Text;
This also only returns the String. I would have thought one of them was supposed to return the Int that was set in the DDL that this was selected from.
I need to deal with the Int value and nothing I have tried seems to be allowing me to do this.
Any ideas?
Thanks