GridTemplateColumn Class
Represents a column allowing you to implement custom data presentation.
Namespace: DevExpress.UI.Xaml.Grid
Assembly: DevExpress.UI.Xaml.Grid.v21.2.dll
NuGet Package: DevExpress.Uwp.Controls
#Declaration
public class GridTemplateColumn :
GridColumnBase,
IDetailElement<ColumnBase>
#Remarks
There are five column types used to present specific data types (Boolean, Date-Time, Numeric, Lists and Text), one column type that provides masking capabilities for text values, and one column type for custom data presentation via templates. Cell values are edited using data editors. Each column type stores specific settings responsible for the data editor’s functionality. A cell’s editor is created when an end-user starts to edit the cell’s value and is automatically destroyed when editing is completed. This dramatically increases the application’s performance.
Use the GridTemplateColumn.CellTemplate property to specify a template that defines the presentation of column cells.
<Grid:GridTemplateColumn FieldName="HoursActive">
<Grid:GridTemplateColumn.CellTemplate>
<DataTemplate>
<Slider Minimum="-100" Maximum="1000" SmallChange="10" LargeChange="50" Value="{Binding Path=HoursActive, Mode=TwoWay}" Height="30" Margin="0,-18,0,0"/>
</DataTemplate>
</Grid:GridTemplateColumn.CellTemplate>
</Grid:GridTemplateColumn>
When an end-user activates a cell within a column with a custom template, the GridControlBase.ShownEditor event is not raised. Since the GridControlBase.HiddenEditor event is not raised either, the DataControlBase.ActiveEditor property value always stays null.
To learn more, see Data Editing.