DataGridCell Structure
Identifies a cell in the grid.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
| Name | Description | |
|---|---|---|
![]() | DataGridCell(Int32, Int32) | Initializes a new instance of the DataGridCell class. |
| Name | Description | |
|---|---|---|
![]() | ColumnNumber | Gets or sets the number of a column in the System.Windows.Forms.DataGrid control. |
![]() | RowNumber | Gets or sets the number of a row in the System.Windows.Forms.DataGrid control. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Gets a value indicating whether the DataGridCell is identical to a second DataGridCell.(Overrides ValueType.Equals(Object).) |
![]() | GetHashCode() | Gets a hash value that can be added to a Hashtable.(Overrides ValueType.GetHashCode().) |
![]() | GetType() | |
![]() | ToString() | Gets the row number and column number of the cell.(Overrides ValueType.ToString().) |
The DataGridCell can be used in conjunction with the System.Windows.Forms.DataGrid control's CurrentCell property to get or set the value of any cell. Setting the System.Windows.Forms.DataGrid control's CurrentCell property to a DataGridCell causes the focus to move to the cell specified by the DataGridCell.
The following example assigns the DataGridCell to the CurrentCell of a System.Windows.Forms.DataGrid and returns the column and row number of the selected cell. The value stored in the DataTable is also printed using the DataGridCell object's RowNumber and ColumnNumber.
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

