This is a migrated thread and some comments may be shown as answers.

[Solved] RadGrid dependent column

2 Answers 103 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Arun
Top achievements
Rank 1
Arun asked on 06 May 2013, 07:52 PM
Hi 

I have two columns in my radgrid
Empid - readonly, mandatory
EmpName - dropdown column , datavaluefield= "EmpID", datatextfield="EmpName"

On selection of an Employee in my dropdownlist I need to set and pertain the value of the EmpID column based on the selection in the EmpName.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 May 2013, 04:35 AM
Hi,

I suppose you want to set the cell value based on value selected in dropdownlist. Here is the sample code.
c#
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
   {
       DropDownList ddl = (DropDownList)sender;
       GridDataItem item = (GridDataItem)ddl.NamingContainer;
       item["Uniquename"].Text = ddl.SelectedValue;
   }

Thanks,
Shinu
0
Arun
Top achievements
Rank 1
answered on 10 May 2013, 05:44 AM
Thank you Shinu
Tags
Grid
Asked by
Arun
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Arun
Top achievements
Rank 1
Share this question
or