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

GetCellDisplayRectangle

5 Answers 281 Views
GridView
This is a migrated thread and some comments may be shown as answers.
konrad
Top achievements
Rank 1
konrad asked on 05 Jan 2013, 06:35 PM
Hello!

RadGridView does not contain a definition of GetCellDisplayRectangle.
Is there any way to get PointToScreen location of cell in RadGridView?

I want to show new form just above RowIndex = 1 and ColumnIndex = 3.
In standard DataGridView from .Net this work like:

Point location = grid.PointToScreen(grid.GetCellDisplayRectangle(3, 1, false).Location);

5 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Petrov
Telerik team
answered on 09 Jan 2013, 02:57 PM
Hi Dominik,

Thank you for writing.

You can use the following code snippet to get the cell location:
GridCellElement cellElement = this.radGridView1.GridElement.GetCellElement(this.radGridView1.Rows[1], this.radGridView1.Columns[3]);
 
if (cellElement != null)
{               
    Point cellLocation = this.radGridView1.PointToScreen(cellElement.ControlBoundingRectangle.Location);
}

I hope this is useful. Should you have further questions, I would be glad to help.

All the best,
Ivan Petrov
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
konrad
Top achievements
Rank 1
answered on 23 Jan 2013, 09:12 AM
Works like a charm!
Thanks for your help.
0
Richard
Top achievements
Rank 1
answered on 21 Mar 2017, 11:37 PM
'RadGridView' does not contain a definition for 'GridElement' and no extension method 'GridElement' accepting a first argument of type 'RadGridView' could be found (are you missing a using directive or an assembly reference?)
0
Dimitar
Telerik team
answered on 22 Mar 2017, 07:36 AM
Hi Richard,

You should use the TableElement property instead

Do not hesitate to contact us if you have other questions.
 
Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Richard
Top achievements
Rank 1
answered on 22 Mar 2017, 07:50 PM
Works like a charm!
Thanks for your help.
Tags
GridView
Asked by
konrad
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
konrad
Top achievements
Rank 1
Richard
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or