DataGridView and GridControl (Legacy) - Comparison
- 5 minutes to read
This document compares the DataGridView for Xamarin.Forms with the legacy GridControl, and describes the differences in features, API, and behavior of these controls.
Features
This table lists features of the new DataGridView that the legacy GridControl does not support:
The following table list the GridControl‘s features that the new DataGridView does not support:
Behavior
This section describes differences in implementation and behavior of the functionality that the DataGridView and GridControl support.
Editing Rows
Editor | DataGridView (New) Learn more… | GridControl (Legacy) Learn more… | ||
---|---|---|---|---|
In-place | In-place cell editor | In-place row editor | ||
Edit Form | To allow users to edit cell values via an edit form, create an EditFormPage instance and handle the grid’s event (for example, Tap or DoubleTap) to specify a gesture that invokes the edit form. | The grid invokes an edit form according to the RowEditMode property value. To replace the default row edit form with a custom form, use the EditFormContent property. | ||
GridControl.AllowEditRows - Specifies whether users are allowed to change cell values in the grid. |
Load More
The new grid automatically performs the load-more operation unless data rows fill the entire viewport or the number of visible rows does not change.
Swipe Actions
DataGridView (New) Learn more… | GridControl (Legacy) Learn more… |
---|---|
DataGridView.StartSwipeItems | GridControl.LeftSwipeButtons |
- | |
The grid can display an icon within a swipe item and | - |
- |
Themes
DataGridView (New) Learn more… | GridControl (Legacy) Learn more… |
---|---|
Light and Dark built-in themes
| Light and Dark built-in themes
|
When the ThemeManager applies a theme, it adds implicit styles for a grid and its elements to the application’s ResourceDictionary. | To customize the applied theme, use the ThemeBase class. Its properties provide access to different customizers that you can use to change appearance settings (for example, font attributes, border and background colors, etc.) of the grid’s visual elements (data cells, group rows, filter panel, etc.). |
Column Width
| DataGridView (New) | GridControl (Legacy) |
---|---|---|
API | GridColumn.Width - Specifies the column width as a GridLength value. Allows you to define absolute (for example, 50) or proportional (for example, 2*) width value, but does not support the Auto option. | GridControl.ColumnsAutoWidth |
Behavior | The grid adjusts column widths so that the total width of all columns equals the grid’s width. When you set the Width property for a column, the grid automatically changes the widths of other columns. To specify the minimum and maximum column width, use the MinWidth and MaxWidth properties. If the total column width exceeds the grid’s width, horizontal scrolling is enabled. | ColumnsAutoWidth = true ColumnsAutoWidth = false |
Grid in the StackLayout Container
DataGridView (New) | GridControl (Legacy) |
---|---|
The grid height is equal to the height of the device’s screen, regardless of the number of data items. | The grid can change its height to show all data rows. |
Miscellaneous
The new grid’s CustomizeCellDisplayTextEventHandler has a sender parameter.
Renamed API
DataGridView (New) | GridControl (Legacy) |
---|---|
Namespace: DevExpress.XamarinForms.* | Namespace: DevExpress.Mobile.* |
DataGridView.GroupCollapsing | GridControl.GroupRowCollapsing |
DataGridView.SelectionChanged event’s argument type: | GridControl.SelectionChanged event’s argument type: |