The .NET MAUI DataGrid control is used to display and manipulate data in a tabular view. Its rich feature set includes different column types, sorting, autofitting for columns and rows, and styling for all elements.
Easily get started with the .NET MAUI DataGrid using a few simple lines of XAML code example as demonstrated below. Also, explore our .NET MAUI DataGrid Example that shows you how to render and configure the .NET MAUI DataGrid.
- <?xml version="1.0" encoding="utf-8" ?>
- <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- xmlns:syncfusion="clr-namespace:Syncfusion.Maui.DataGrid;assembly=Syncfusion.Maui.DataGrid"
- xmlns:local="clr-namespace:GettingStarted"
- x:Class="GettingStarted.MainPage">
- <ContentPage.BindingContext>
- <local:OrderInfoRepository x:Name="viewModel" />
- </ContentPage.BindingContext>
- <ContentPage.Content>
- <syncfusion:SfDataGrid x:Name="dataGrid"
- ItemsSource="{Binding OrderInfoCollection}">
- </syncfusion:SfDataGrid>
- </ContentPage.Content>
- </ContentPage>
The .NET MAUI DataGrid control was built from the ground up for the best possible performance, even when loading large amounts of data.
Responsive features allow the DataGrid layout to be viewed on different devices. It is also possible to hide specific columns and customize the width of all the columns or individual columns with built-in column sizing options.
Bind data seamlessly from various local and remote data sources, such as JSON, OData, WCF, and RESTful web services.
Experience easy editing with our in-place editing feature! With a seamless interface and a wide range of built-in column types, including text, numeric, combo box, and date-picker editors, users will enjoy unparalleled control over their data. Easily commit or roll back changes with just a few clicks, ensuring the smoothest editing experience possible.
Sort one or more columns in ascending or descending order. Perform tri-state sorting and display sort numbers to indicate the sort order.
Programmatically group data by one or more columns using flexible templates. The groups can be expanded or collapsed based on user preference. Additionally, the grouping logic can be customized to apply specific rules for data grouping.
Programmatically filter the rows by setting a predicate to the view.
Display a row containing summary data for the columns with aggregate types sum, minimum, maximum, average, and count. The following are the different categories of summary:
In high-pressure situations, maintaining up-to-date information is critical. The DataGrid supports real-time updates to cells, enhancing efficiency and responsiveness.
Freeze rows and columns at the top and bottom of the view, similar to Excel. Horizontal and vertical scrolling can be performed, except on frozen columns and rows.
Group the columns under a common header. Users can add multiple rows and define multicolumn headers in the stacked header rows.
Adjust (auto fit) the row height based on the content of any column or certain columns to enhance the readability of the content. It is also possible to set the row height conditionally.
Display additional columns that are not bound to data objects from the underlying data source. The control supports applying arithmetic/logical expressions on cell values of bound columns to populate the cells of unbound columns.
Display rows at the top and bottom of the grid with data that is not bound to the data source.
Associate swipe buttons with custom actions. Swipe buttons are displayed by swiping left or right over a data row. Create swipe templates and associate the views in them with custom actions.
Reorder rows and columns by simply dragging and dropping them into place.
Resize a column on touch-up. Restrict a column with a minimum width to avoid hiding it and a maximum width to restrict resizing beyond the limit.
The Syncfusion .NET MAUI DataGrid control supports the following features:
You can find our .NET MAUI DataGrid demo, which demonstrates how to render and configure the DataGrid.
Yes, Syncfusion offers a 30-day free trial. After the trial, licensing is required for continued use.
Use the SfDataPager control and bind it to the DataGrid’s ItemsSource. Customize the page size using the PageSize
property.
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.
A good place to start would be our comprehensive getting started documentation.
The .NET MAUI DataGrid Control is bound to an external data source to display data in a tabular format. It supports data sources such as List, IEnumerable and more. The SfDataGrid. ItemsSource
property helps bind this control with a collection of objects.
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:GettingStarted" xmlns:syncfusion="clr-namespace:Syncfusion.Maui.DataGrid;assembly=Syncfusion.Maui.DataGrid" x:Class="GettingStarted.MainPage"> x:Name="sfDataGrid" ItemsSource="{Binding OrderInfoCollection}" />
SfDataGrid has a built-in functionality to sort one or more columns using the SortingMode
property. When sorting is enabled, the data grid automatically reorders the data based on the chosen sort criteria. You can sort data by tapping on the column header. After sorting, a sort icon appears in the respective column header to indicate the direction of the sort.
Yes, the grid adjusts dynamically to different screen sizes and orientations for a seamless experience.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.