Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CurrentCell Property
Collapse the table of content
Expand the table of content

DataGrid.CurrentCell Property

.NET Framework 4.6 and 4.5

Gets or sets the cell that has focus.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public DataGridCellInfo CurrentCell { get; set; }

Property Value

Type: System.Windows.Controls.DataGridCellInfo
Information about the cell that has focus.

The value returned is a structure that provides information about the cell and the data item associated with the cell. It is not an actual reference to the DataGridCell container.

To set properties on the selected cells, you can set a trigger in the CellStyle property. For more information, see CellStyle.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft