Gets the Rectangle of the cell specified by System.Drawing.DataGridCell.
[Visual Basic] Overloads Public Function GetCellBounds( _ ByVal dgc As DataGridCell _ ) As Rectangle [C#] public Rectangle GetCellBounds( DataGridCell dgc ); [C++] public: Rectangle GetCellBounds( DataGridCell dgc ); [JScript] public function GetCellBounds( dgc : DataGridCell ) : Rectangle;
A Rectangle that defines the current cell's corners.
Teh following example uses the GetCellBounds method to return a Retangle of a specified cell.
[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 | DataGrid.GetCellBounds Overload List | GetCurrentCellBounds