Back to Devexpress

ColumnBase.IsSmart Property

wpf-devexpress-dot-xpf-dot-grid-dot-columnbase-d13625fd.md

latest4.3 KB
Original Source

ColumnBase.IsSmart Property

Gets or sets whether to enable the smart columns generation feature for the column. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public bool IsSmart { get; set; }
vb
Public Property IsSmart As Boolean

Property Value

TypeDescription
Boolean

true to enable the smart columns generation feature for the column; otherwise, false.

|

Remarks

If the IsSmart property is set to true , the grid automatically configures the column according to Data Annotations and the DevExpress Fluent API specified in the underlying data source. To learn more, see Applying Data Annotations.

Note

The smart column generation mechanism ignores column binding converters. When using column binding converters, set the IsSmart property to false.

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsSmart 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-bind-wpf-grid-to-data/CS/CodeBehind/EFCore/LocalData/MainWindow.xaml#L12

xml
</dxg:GridControl.View>
<dxg:GridColumn FieldName="Id" IsSmart="True"
                ReadOnly="True" />

wpf-data-grid-implement-crud-operations/CS/CodeBehind/EFCore/PagedAsyncSource/MainWindow.xaml#L25

xml
</dxg:GridControl.View>
<dxg:GridColumn FieldName="Id" IsSmart="True"
                AllowEditing="True" ReadOnly="True" />

wpf-data-grid-extend-crud-operations/CS/DetailCollectionEditing/MainWindow.xaml#L24

xml
</dxg:GridControl.View>
<dxg:GridColumn FieldName="Id" IsSmart="True" ReadOnly="True" />
<dxg:GridColumn FieldName="FirstName" IsSmart="True" />

wpf-data-grid-bind-to-infiniteasyncsource/CS/InfiniteAsyncSourceSample/MainWindow.xaml#L17

xml
<dxg:GridControl.Columns>
    <dxg:GridColumn FieldName="Id" IsSmart="True" AllowEditing="True" Width="*"/>
    <dxg:GridColumn FieldName="Subject" IsSmart="True" AllowEditing="True" Width="2*"/>

wpf-data-grid-bind-to-pagedasyncsource/CS/PagedAsyncSourceSample/MainWindow.xaml#L14

xml
<dxg:GridControl.Columns>
    <dxg:GridColumn FieldName="Subject" IsSmart="True" Width="2*"/>
    <dxg:GridColumn FieldName="User" IsSmart="True" Width="*"/>

See Also

EnableSmartColumnsGeneration

ColumnBase Class

ColumnBase Members

DevExpress.Xpf.Grid Namespace