Migrate from Xamarin.Forms SfDataGrid to .NET MAUI SfDataGrid
17 Mar 20233 minutes to read
To make migration from Xamarin SfDataGrid to .NET MAUI SfDataGrid easier, we kept most of the APIs from Xamarin SfDataGrid in MAUI SfDataGrid. However, to maintain the consistency of API naming in MAUI SfDataGrid, we renamed some of the APIs. The APIs that have been changed in MAUI SfDataGrid from Xamarin SfDataGrid are detailed as follows.
Namespaces
Xamarin SfDataGrid | .NET MAUI SfDataGrid |
---|---|
Syncfusion.SfDataGrid.XForms | Syncfusion.Maui.DataGrid |
Syncfusion.Data | Syncfusion.Maui.Data |
Enums
Xamarin SfDataGrid | .NET MAUI SfDataGrid | Description |
---|---|---|
Defines constants that specify how the columns in a are sized. | ||
Defines the constants that specifies how the sorting is applied. |
Properties
Xamarin SfDataGrid | .NET MAUI SfDataGrid | Description |
---|---|---|
Defines constants that specify how the columns in a are sized. | ||
Specifies that the single column alone can be sorted at a time. | ||
Specifies that the multiple columns can be sorted. | ||
Defines the constants that specifies how the sorting is applied. | ||
Gets or sets a value indicating whether a column should be visible. | ||
Gets or sets a row which is currently selected. | ||
Gets or sets the collection of rows which are all selected. | ||
Gets or sets a row which is currently navigated. | ||
Gets or sets the background for the header row. | ||
Gets or sets the background of the data rows. | ||
Gets or sets the text color of the data row. | ||
Gets or sets the text color of the header row. | ||
Gets or sets the color for the grid lines. | ||
Gets or sets the stroke thickness of the grid lines. | ||
Gets or sets the background of the selected rows. | ||
Gets or sets the text color of the selected rows. | ||
Gets or sets the value that indicates how all the columns widths are determined. | ||
Gets or sets the font attributes. | ||
Gets or sets the font family. | ||
Gets or sets the font attributes. | ||
Gets or sets the font family. |
Events
Xamarin SfDataGrid | .NET MAUI SfDataGrid | Description |
---|---|---|
Occurs when the cell is tapped. | ||
Occurs when the cell is tapped twice. | ||
Occurs when the cell is long pressed for particular period. | ||
- | This event is not available in MAUI DataGrid. You can write the custom style for
TargetType. By writing the converter, you can achieve the requirement conditionally. Refer UG documentation for more information. |
|
- | This event is not available in MAUI DataGrid. You can write the custom style for
TargetType. By writing the converter, you can achieve the requirement conditionally. Refer UG documentation for more information. |
Methods
Xamarin SfDataGrid | .NET MAUI SfDataGrid | Description |
---|---|---|
Gets the row height to fit that row based on the content. We have passed the optional parameters such as and where as we have not provided the class as parameters. |
Classes
Xamarin SfDataGrid | .NET MAUI SfDataGrid | Description |
---|---|---|
Represents the base class for the different column types of the control. | ||
A column which is used to handle the numeric values. | ||
A column which is used to show any type of System.DateTime. | ||
A column which is used to show any type of ImageSource. | ||
A column which is used to show any type of template. | ||
Represents a column that hosts textual Content in its cells. | ||
Represents a record cell in a control. | ||
Represents a record row in a control. | ||
Represents a header cell in a control | ||
Represents a class that handles the sizing for all the in the Columns collection in a control. |
Known issues
- [Android] Horizontal scrolling performance is not smooth in the Debug solution configuration when compared to Xamarin.Forms SfDataGrid. However, the scrolling performance is smooth when the solution configuration is Release.
Upcoming Features
- Paging
- Right to left
- Accessibility
- Custom selection
- Grouping
- Summaries (Group and Caption)
- Editing
- ComboBox column
- Load more
- Swiping
- Exporting to Excel and Pdf
- Unbound row
- Unbound column
- Pull To Refresh
- Column drag and drop
- Row drag and drop