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.
相关文章
- WPF入门教程系列三——Application介绍(续)
- [WPF]C#连接使用sqllite数据库,,支持多线程操作
- mongodb or and 条件拼凑 Query.And Query.Or
- 【wpf】 当用了数据模板之后如何获取控件的Item?
- WPF 自定义控件 Loaded 导致的设计器异常 解决方案
- [WPF]本地化入门
- 在WPF中使用Prism弹出自定义窗体样式的对话框
- WPF列表控件第一行子项样式无效问题
- 【WPF】屏幕右下角消息提示框
- 【WPF】代码触发Button点击事件
- 【C#/WPF】用Thumb做可拖拽的UI控件
- 【WPF】ListBox使用DataTemplate 以及默认选中第一项Item