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

Selecting radGridView row

3 Answers 86 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 05 Sep 2011, 08:03 PM
Hello, Happy Holidays!

I  have a variable SelectedIndex that is bound to the index of the "clicked" row. I use SelectedIndex like this: radGridView1.Rows[0].ChildRows[SelectedIndex].IsCurrent = true; but this doesn´t work, it highlights the first row. If I use radGridView1.Rows[0].ChildRows[1].IsCurrent = true; for example it works! anyone can give me an idea?

thanks in advance,
Michael

3 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 08 Sep 2011, 01:39 PM
Hello Michael,

Thank you for writing.

Your solution should work as long as the SelectedIndex value is in the range of indexes of ChildRows collection which you access. Please could you give us more details/code snippets regarding your implementation? It will help me investigate this case further and find suitable solution for it.

I am looking forward to your reply.

Best regards,
Alexander
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Michael
Top achievements
Rank 1
answered on 08 Sep 2011, 02:56 PM
Hello Alexander,

I solved the problem there was an assignment of the variable SelectedIndex. I used two variables and it worked well.

Thank you for your attention,
Michael
0
Alexander
Telerik team
answered on 08 Sep 2011, 03:40 PM
Hello Michael,

I am glad to hear you have found solution for this scenario. Do not hesitate to contact us again if you have further questions.

Best regards,
Alexander
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
GridView
Asked by
Michael
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Michael
Top achievements
Rank 1
Share this question
or