Comparison: Standard WPF DataGrid and DevExpress WPF GridControl

Comparison: Standard WPF DataGrid and DevExpress WPF GridControl

This article describes the main differences between Standard WPF DataGrid and DevExpress WPF GridControl. Use it to migrate from the Standard WPF DataGrid to the DevExpress WPF GridControl.

 

Display Data

Standard WPF DataGrid
Displays data in tabular format. To configure data presentation, customize the control and column objects.
DevExpress WPF GridControl

Uses three types of views to display data. To configure data presentation, customize the View and column objects:

 

Bind to Data

Standard WPF DataGrid and DevExpress WPF GridControl use the same property to bind to data - ItemsSource.

#Columns

Standard WPF DataGrid
Columns use the Binding or SelectedItemBinding property to bind to data. A DataGridTemplateColumn defines data binding inside a cell template.
DevExpress WPF GridControl

Columns use the FieldName and Binding properties to bind to data.

The Binding property uses the standard binding mechanism. The FieldName uses PropertyDescriptor objects and has better performance than the Binding property. Refer to the following topic for more information on trade-offs between performance and flexibility: Binding Columns to Data Source Fields.

You cannot use the FieldName property to bind a column to a collection property. To display such a property in a GridControl cell, use any of the following techniques:

  • Change the field type from a collection to Object in your application’s Model.
  • Use the Binding property.

GridControl uses the FieldName property to identify columns. When you use the Binding property, the FieldName property is set automatically. Refer to the following topic for more information: Binding Columns to Data Source Fields - How the GridControl Identifies Columns.

 

posted @ 2022-12-05 14:42  ChuckLu  阅读(27)  评论(0编辑  收藏  举报