Back to Devexpress

DevExpress Data Grid for .NET MAUI

maui-403255-data-grid-data-grid.md

latest5.7 KB
Original Source

DevExpress Data Grid for .NET MAUI

  • Jul 03, 2024
  • 3 minutes to read

The DataGridView is a data-aware control designed to display and manage data in a tabular format.

View ExampleRead TutorialWatch Video

Add a Data Grid to a Page

  1. Download and install the DevExpress.Maui.DataGrid package from the DevExpress NuGet Gallery to obtain the DataGridView component. For more information on how to build your first .NET MAUI app, refer to the following help topic: Get Started.

  2. Declare the xmlns:dx="http://schemas.devexpress.com/maui" XAML namespace in a page.

  3. Add a DataGridView instance to the page.

  4. To bind the DataGridView to a data source, use the DataGridView.ItemsSource property. Then add columns.

xaml
<ContentPage ...
             xmlns:dx="http://schemas.devexpress.com/maui"
             xmlns:local="clr-namespace:DataGridExample">
    <ContentPage.BindingContext>
        <local:EmployeeDataViewModel/>
    </ContentPage.BindingContext>
    <dx:DataGridView ItemsSource="{Binding Items}">
        <dx:DataGridView.Columns>
            <dx:TextColumn FieldName="Name"/>
            <!-- Other columns -->
        </dx:DataGridView.Columns>
    </dx:DataGridView>
</ContentPage>

For a step-by-step guide on how to create a .NET MAUI app with the DataGridView control, refer to the following help topic: Get Started with DataGridView.

Next Steps

Get Started with DataGridViewThis step-by-step tutorial guides you through creating an app with a DataGridView.Bind to DataDescribes how to populate DataGridView cells with data.Columns and RowsThis topic explains columns and rows in a DataGridView.Create-Read-Update-Delete (CRUD) OperationsTopics in this section describe how to incorporate CRUD operations in a .NET MAUI app with a DataGridView.Data ValidationThis topic explains how to validate new data grid values, indicate errors and prevent saving invalid data to the data source.Drag and Drop OperationsThis topic explains how to enable drag and drop operations to allow users to reorder rows.Edit Cell Values in In-Place ModeThis topic explains how to allow users to use in-place editors to display and edit DataGridView cell values.ExportThis topic shows how to export a DataGridView in different formats (PDF, XLSX, HTML and more).Filter rowsThis topic lists different ways to filter DataGridView rows: filtering UI, filter row and filtering API.Sort rowsThis topic explains how to sort DataGridView rows.Group rowsThis topic explains how to group DataGridView rows.SummariesYou can calculate summaries for row groups or for an entire DataGridView.Pull to refreshUsers can request content updates with a pull-down gestures.Load moreThis topic explains how to load a set of new data items to the end of the grid once a user scrolls to the bottom of the grid.Swipe gesturesThis topic explains how to show swipe elements when a user swipes a DataGridView items and perform custom actions on tap.Multi-row column layoutThis article explain how you can position grid columns into multi-row groups to be shown within data rows.Customize appearanceLists API members that you can use the appearance and layout of the DataGridView control and its elements.ExamplesLists task-based solutions with the DataGridView control.

Data Grid Column Chooser

Use Office File API to Import Excel Data

Replicate a Single-Column Kanban View

See Also

Get Started with DevExpress Data Grid for .NET MAUI

Get Started with DevExpress Controls for .NET Multi-platform App UI (.NET MAUI)

Material Design - Data Tables