Skip to content

DataGrid

SKProCH edited this page Nov 4, 2024 · 3 revisions

The DataGrid control is a control that displays data in a customizable grid.

Installing and using

If you want to use DataGrid control, add Material.Avalonia.DataGrid package:

dotnet add package Material.Avalonia.DataGrid

Nuget.Material.Avalonia.DataGrid Nuget.Material.Avalonia.DataGrid

If you are using MaterialTheme[Base] styles should be included automatically.
However, sometimes this is not the case. Reported issues on browser, probably something AOT related. Anyway, if this happens (DataGrid are invisible), you must add MaterialDataGridStyles to your App.axaml:

<Application ...
  xmlns:dataGrid="clr-namespace:Material.Avalonia.DataGrid;assembly=Material.Avalonia.DataGrid"
  ...

  <Application.Styles>
    ...
    <dataGrid:MaterialDataGridStyles/>

Various ScrollBar styles in DataGrid

Default

By default DataGrid have Modern ScrollBars.

Classic

Add ClassicScrollBar to DataGrid Classes property.

Mini

Add MiniScrollBar to DataGrid Classes property.

Disable hovering scrollbars

In the case of using Modern and Mini scrollbars, allows to make them so that they do not float on top of the DataGrid rows, but are to the side of them.
Add DisableHoveringScrollBar to DataGrid Classes property.

Material.Avalonia Wiki pages is still WIP (work in progress), Pages could not ready for show if they unclickable.

Main section

Widgets / Controls

Theming

Builders

Assist for widgets

Clone this wiki locally