Skip to main content

DataControlBase.ColumnGeneratorTemplate Property

Gets or sets a template that describes grid columns. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v14.2.Core.dll

#Declaration

[CloneDetailMode(CloneDetailMode.Skip)]
public DataTemplate ColumnGeneratorTemplate { get; set; }

#Property Value

Type Description
DataTemplate

The column template.

#Remarks

Since the release of v2011 vol.1, the DevExpress Silverlight Grid Control supports column binding. The grid can be bound to a collection of objects containing column settings, described in a Model or ViewModel, minimizing the need for 'code-behind'. The Grid Control generates columns based on column templates. Create multiple templates, one template for each column type. Using a single template, you can create an unlimited number of columns in an unlimited number of grid controls.

To choose the required template based on the column's type, use the Template Selector assigned to the DataControlBase.ColumnGeneratorTemplateSelector property. If all grid columns can be described using a single template, you have no need to create a column template selector. Instead, assign this template to the grid's ColumnGeneratorTemplate property.

To learn more, see Binding to a Collection of Columns.

See Also