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

getting combobox selectedValue

1 Answer 230 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Razeen
Top achievements
Rank 1
Razeen asked on 25 Apr 2010, 09:16 PM
Hi
    I have two columns in radgrid Column1,Column2..Radgrid is not Databinded..I want to enter row manually..Column1 is combobox..It has items A,B,C and values 1,2,3..Column2 is Text box.When i select the combobox, its selected value should be set to the second column..again in new row when i select combobox its selected value should be set in Column2..I am using C#.

Thanks 
Razeen
        

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 26 Apr 2010, 01:54 PM
Hello Razeen,

You can do this by handling the CellValueChanged event. Here is the code:

void radGridView1_CellValueChanged(object sender, GridViewCellEventArgs e)
{
    GridViewDataColumn column = e.Column as GridViewDataColumn;
    if (column != null && column.UniqueName == "Value")
    {
        e.Row.Cells["Name"].Value = e.Row.Cells["Value"].Value.ToString();
    }
}

All the best,
Jack
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Razeen
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or