ColumnBase.DisplayTemplate Property

Gets or sets a template that displays column values. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v21.1.Core.dll


public ControlTemplate DisplayTemplate { get; set; }

Property Value

Type Description

A ControlTemplate object that represents the template that displays column values.



Starting from v18.2, using the ColumnBase.CellDisplayTemplate is recommended.

If the Name property of a control used to display cell values is set to PART_Editor, the GridControl treats it as its inner control, i.e., fills it with values and enables search results highlighting.

The following code example shows how to use custom editors (ProgressBar and Slider) to display and edit the Units On Order column’s values.

View Example: How to Use Custom Editors to Edit Cell Values

<dxg:GridControl x:Name="grid" ItemsSource="{Binding Products}" 
        <!-- -->
        <dxg:GridColumn FieldName="UnitsOnOrder">
                    <ProgressBar Minimum="0" Maximum="50"
                                 Value="{Binding Path=DisplayText, Mode=OneWay, 
                                                 RelativeSource={RelativeSource TemplatedParent}}"/>
                    <Grid VerticalAlignment="Center">
                        <Slider Name="PART_Editor" Minimum="0" Maximum="50" 
                                Value="{Binding Path=EditValue, Mode=TwoWay, 
                                                RelativeSource={RelativeSource TemplatedParent}, 
                                                Converter={local:IntToDoubleConverter}}" />
                        <TextBlock Text="{Binding EditValue, RelativeSource={RelativeSource TemplatedParent}}" 
                                   Foreground="Black" VerticalAlignment="Center" 
                                   HorizontalAlignment="Center" TextWrapping="NoWrap" />
        <dxg:TableView AutoWidth="True" />


Using BaseEdit descendants is not recommended.

See Also