NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGrid.GetCellBounds (DataGridCell)

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;

Parameters

dgc
The DataGridCell to look up.

Return Value

A Rectangle that defines the current cell's corners.

Example [Visual Basic]

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

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace | DataGrid.GetCellBounds Overload List | GetCurrentCellBounds