Gets the Rectangle that specifies the four corners of a cell.
Gets the Rectangle of the cell specified by row and column number.
[Visual Basic] Overloads Public Function GetCellBounds(Integer, Integer) As Rectangle
[C#] public Rectangle GetCellBounds(int, int);
[C++] public: Rectangle GetCellBounds(int, int);
[JScript] public function GetCellBounds(int, int) : Rectangle;
Gets the Rectangle of the cell specified by System.Drawing.DataGridCell.
[Visual Basic] Overloads Public Function GetCellBounds(DataGridCell) As Rectangle
[C#] public Rectangle GetCellBounds(DataGridCell);
[C++] public: Rectangle GetCellBounds(DataGridCell);
[JScript] public function GetCellBounds(DataGridCell) : Rectangle;
Teh following example uses the GetCellBounds method to return a Retangle of a specified cell.
Note This example shows how to use one of the overloaded versions of GetCellBounds. For other examples that may be available, see the individual overload topics.
[Visual Basic]
Private Sub GetRect() Dim rect As Rectangle Dim dgc As DataGridCell dgc.ColumnNumber = 0 dgc.RowNumber = 0 rect = DataGrid1.GetCellBounds(dgc) Console.WriteLine(rect.ToString) End Sub
DataGrid Class | DataGrid Members | System.WinForms Namespace