DataControlBase.ColumnGeneratorStyle Property
Gets or sets a style that contains settings common to all columns generated using different templates. This is a dependency property.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v14.2.Core.dll
#Declaration
#Property Value
Type | Description |
---|---|
Style | A Style object that is the style that contains settings common to all columns generated using different templates. |
#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 specify settings common to all columns generated using different templates, create a style and assign it to the ColumnGeneratorStyle property.
<Window.Resources>
<Style x:Key="ColumnStyle" TargetType="dxg:GridColumn">
<Setter Property="FilterPopupMode" Value="CheckedList"/>
<Setter Property="FieldName" Value="{Binding FieldName}"/>
</Style>
</Window.Resources>