.NET MAUI TreeDataGrid Columns Cell Templates
This article describes how to extend the functionality of the columns in the .NET MAUI TelerikDataGrid and define custom content and edit templates using the CellContentTemplate
and CellEditTemplate
properties.
-
CellContentTemplate
(DataTemplate
)—Defines the appearance of each cell associated with the concrete column.CellContentTemplate
gives you the opportunity to wrap the text inside each DataGrid column. You can add a Label as a content of the Text, Template Column and wrap its text using the Label'sLineBreakMode
property. -
CellContentTemplateSelector
(DataTemplateSelector
)—Defines aDataTemplateSelector
instance that may be used to retrieve dynamic data templates on a per-cell basis. -
CellEditTemplate
(DataTemplate
)—Defines the editor associated with the concrete column. TheCellEditTemplate
is displayed when the cell is in edit mode.
As the TreeDataGrid inhertis from the DataGrid, for a runnable example with
CellContentTemplate
andCellEditTemplate
scenario, see the SDKBrowser Demo Application and go to DataGrid > Columns category.