wpf-devexpress-dot-xpf-dot-grid-dot-datacontrolbase-3cddb60b.md
Gets or sets whether to enable smart columns generation feature. This is a dependency property.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public bool EnableSmartColumnsGeneration { get; set; }
Public Property EnableSmartColumnsGeneration As Boolean
| Type | Description |
|---|---|
| Boolean |
true to enable smart columns generation feature; otherwise, false.
|
If the EnableSmartColumnsGeneration property is set to true , the grid automatically configures columns according to information specified in the underlying data source using Data Annotation Attributes and DevExpress Fluent API.
View Example: Apply Data Annotations
Refer to the Smart Columns Generation topic for a complete list of supported data types and corresponding data editors.
The following code snippets (auto-collected from DevExpress Examples) contain references to the EnableSmartColumnsGeneration property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
how-to-implement-drag-and-drop-between-gridcontrols-t566656/CS/MainWindow.xaml#L12
<dxg:GridControl Name="gridControl1" AutoGenerateColumns="AddNew" EnableSmartColumnsGeneration="True">
<dxg:GridControl.View>
wpf-grid-sync-isnodeexpanded-with-view-model/CS/DevExpress.Example04/MainWindow.xaml#L41
<dxg:GridControl Grid.Row="2" AutoGenerateColumns="AddNew" x:Name="parents"
EnableSmartColumnsGeneration="True" ItemsSource="{Binding Parents}">
<dxg:GridControl.View>
wpf-use-devexpress-theme-in-applications/CS/DevExpress.Examples.ThemeSwitcher/MainWindow.xaml#L27
<dxg:GridControl Grid.Row="1" AutoGenerateColumns="AddNew" x:Name="dxGrid" EnableSmartColumnsGeneration="True">
<dxg:GridControl.View>
dx:ThemeManager.Theme="{Binding ElementName=themes, Path=SelectedItem}"
EnableSmartColumnsGeneration="True" ItemsSource="{Binding Items}">
<mvvm:Interaction.Behaviors>
how-to-customize-drop-marker-t568780/CS/MainWindow.xaml#L21
</Window.Resources>
<dxg:GridControl Name="gridControl" AutoGenerateColumns="AddNew" EnableSmartColumnsGeneration="True">
<dxg:GridControl.View>
See Also