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.GetCurrentCellBounds

Gets a Rectangle that specifies the four corners of the selected cell.

[Visual Basic]
Public Function GetCurrentCellBounds() As Rectangle
[C#]
public Rectangle GetCurrentCellBounds();
[C++]
public: Rectangle GetCurrentCellBounds();
[JScript]
public function GetCurrentCellBounds() : Rectangle;

Return Value

A Rectangle that defines the current cell's corners.

Example [Visual Basic]

The following example gets the Rectangle of the selected cell.

[Visual Basic]

Private Sub DataGrid1_CurrentCellChange(ByVal sender As Object, ByVal e As EventArgs)
   Dim rect As Rectangle
   rect = DataGrid1.GetCurrentCellBounds()
   Console.WriteLine(rect.ToString)
End Sub

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace | GetCellBounds