Hi i have an ultrawebgid and one column is dropdownlist.
I bind the list to a datasource like
string pid=123;
grid_adrs.Columns.FromKey("PER2").ValueList.DataSource =DataSource; grid_adrs.Columns.FromKey("PER2").ValueList.ValueMember = "ID"; grid_adrs.Columns.FromKey("PER2").ValueList.DisplayMember = "DESCR"; grid_adrs.Columns.FromKey("PER2").ValueList.DataBind();
and i want to set selected item of that list to the pid so that show the correct descr.
Any ideas
Thanks a lot
Just make sure the value of the cell is set to the PID of the description that you want to display.
-Taz.
Hi Taz,
I have a similar requirement whereby I want to select a newly added item to the drop down list in a cell. The drop down list consists of ID (value) and Name (displaytext)
If I use this line of code:
The grid displays the ID as the DisplayText as well? Further still I want to get the ID back out the row at a later date. How can I select a specifc item in a dropdown list so that the Name is still shown as DisplayText but the value property still actually holds the ID?
Thanks in advance for your help