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

Get Row Location from index

2 Answers 68 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Matteo
Top achievements
Rank 1
Matteo asked on 09 Feb 2015, 11:19 AM
Hi,
I have an integer value that is the index of a row (e.g. int index = 3).
I need to get the row at index 3 and then get the Location/Position on the screen (System.Drawing.Rectangle if possible).
Any idea?

Thanks for the help

2 Answers, 1 is accepted

Sort by
0
Matteo
Top achievements
Rank 1
answered on 11 Feb 2015, 11:38 AM
If anyone is interested...

GridRowElement rowElement = grid.TableElement.GetRowElement(grid.Rows[row.GetIndex().GetIndex()]);
            if (rowElement != null)
            {
                rowBounds = rowElement.ControlBoundingRectangle;
                Console.WriteLine(RectangleToScreen(rowBounds));
            }
0
Hristo
Telerik team
answered on 11 Feb 2015, 04:51 PM
Hi Matteo,

Thank you for sharing your knowledge with our community, I confirm that this is a valid way to get a certain row location.

Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Matteo
Top achievements
Rank 1
Answers by
Matteo
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or