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

[Solved] Selecting a row when clicking on the ComboBox

2 Answers 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Amit Patel
Top achievements
Rank 1
Amit Patel asked on 21 Oct 2009, 08:00 PM
I was wondering if anyone how to get the row selected when i click on the combo box inside of grid row.

Thanks,
Amit

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 22 Oct 2009, 06:01 AM
Hello Amit,

You can use some of the combo events (mouse down for example) to get the parent row with our extension methods and set IsSelected to true:

var row = ((ComboBox)sender).ParentOfType<GridViewRow>();
if(row != null)
{
     row.IsSelected = true;
}

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Amit Patel
Top achievements
Rank 1
answered on 22 Oct 2009, 01:29 PM
Thanks Vlad. This will do the trick
Tags
GridView
Asked by
Amit Patel
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Amit Patel
Top achievements
Rank 1
Share this question
or