DataGridColumn.GetCellContent Method

Definition

Gets the Content property value for a cell in the column.

Overloads

GetCellContent(Object)

Gets the Content property value for the cell at the intersection of this column and the row that represents the specified data item.

GetCellContent(DataGridRow)

Retrieves the Content property value for the cell at the intersection of this column and the specified row.

GetCellContent(Object)

Gets the Content property value for the cell at the intersection of this column and the row that represents the specified data item.

C#
public System.Windows.FrameworkElement GetCellContent(object dataItem);

Parameters

dataItem
Object

The data item that is represented by the row that contains the intended cell.

Returns

The cell content; or null, if the cell is not found.

Exceptions

dataItem is null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

GetCellContent(DataGridRow)

Retrieves the Content property value for the cell at the intersection of this column and the specified row.

C#
public System.Windows.FrameworkElement GetCellContent(System.Windows.Controls.DataGridRow dataGridRow);

Parameters

dataGridRow
DataGridRow

The row that contains the intended cell.

Returns

The cell content; or null, if the cell is not found.

Exceptions

dataGridRow is null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10