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

[Solved] Highlighted row

4 Answers 111 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.
Morten
Top achievements
Rank 1
Morten asked on 08 Dec 2010, 09:55 PM
What is the property that returns the currently highlighted row (by a mouse move) on the grid?
Thanks,
-Morten

4 Answers, 1 is accepted

Sort by
0
Accepted
Timothy
Top achievements
Rank 1
answered on 09 Dec 2010, 01:14 AM
Example of pulling current row from currently selected cell.

Dim cell As GridViewCell = CheckListItemssDataGrid.CurrentCell
        Dim row = cell.ParentOfType(Of GridViewRow)()
0
Maya
Telerik team
answered on 09 Dec 2010, 08:01 AM
Hi Timothy,

You may try to use directly the SelectedItem and CurrentItem properties of the RadGridView. In case you need the row exactly, not the item, you may do the following:

var currentRow = this.playersGrid.ItemContainerGenerator.ContainerFromItem(this.playersGrid.CurrentItem);
var selectedRow = this.playersGrid.ItemContainerGenerator.ContainerFromItem(this.playersGrid.SelectedItem);
 

Regards,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Timothy
Top achievements
Rank 1
answered on 09 Dec 2010, 09:02 AM
Morten posed the initial question. I was just trying to help him out.

Thanks,
Tim
0
Morten
Top achievements
Rank 1
answered on 09 Dec 2010, 05:43 PM
Hi Timothy,
That worked. Thanks!


Maya:
Please consider adding a property for the highlighted row to the RadGridView control.

Thanks,
-Morten

Tags
GridView
Asked by
Morten
Top achievements
Rank 1
Answers by
Timothy
Top achievements
Rank 1
Maya
Telerik team
Morten
Top achievements
Rank 1
Share this question
or