'Declaration
Public Property CellContentTemplate As DataTemplate
'Usage
Dim instance As ColumnBase
Dim value As DataTemplate
instance.CellContentTemplate = value
value = instance.CellContentTemplate
public DataTemplate CellContentTemplate {get; set;}
Property Value
A reference to the DataTemplate used to display the cells' content. By default, a null reference (Nothing in Visual Basic).
Example
All examples in this topic assume that the grid is bound to the Products table of the Northwind database, unless stated otherwise.
The following example demonstrates how to provide a new CellContentTemplate, using property element syntax, for a boolean column that displays a check mark when the cell's value is true, and an x when it is false.The following example demonstrates how to format a cell's content to display a numeric value as a currency value. Although it might be tempting to apply the converter to a column's DisplayMemberBinding, this is not the recommended location as not only will the cells' content be formatted but the data type of the cells' content will be changed to the converter's.
Target Platforms: Windows 11, Windows, 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2