# RadzenDataGrid<TItem> Class

A powerful data grid component for displaying and manipulating tabular data with support for sorting, filtering, paging, grouping, editing, and selection. RadzenDataGrid provides a full-featured table with inline editing, master-detail views, virtualization, export capabilities, and extensive customization options. Supports single/multiple column sorting, simple/advanced filtering, grouping with aggregation, inline/cell editing with validation, and single/multiple row selection with checkbox columns. Features on-demand data loading via LoadData event for server-side operations, export to Excel and CSV formats, column/row templates, group headers/footers, and density modes (Default/Compact) for responsive layouts. The grid can work with in-memory collections or load data on-demand from APIs. Columns are defined using RadzenDataGridColumn components within the Columns template.

Namespace: [Radzen.Blazor](https://blazor.radzen.com/docs/api/Radzen.Blazor.md)

Assembly: Radzen.Blazor.dll

## Inheritance

- Object
- ComponentBase
- [RadzenComponent](https://blazor.radzen.com/docs/api/Radzen.RadzenComponent.md)
- [PagedDataBoundComponent<TItem>](https://blazor.radzen.com/docs/api/Radzen.PagedDataBoundComponent-1.md)
- RadzenDataGrid<TItem>

## Implements

- IComponent
- IHandleEvent
- IHandleAfterRender

## Syntax

```csharp
public class RadzenDataGrid<TItem> : PagedDataBoundComponent<TItem>, IComponent, IHandleEvent, IHandleAfterRender
```

## Type Parameters

| Name | Description |
|------|-------------|
| TItem | The type of data items displayed in the grid. Each row represents one instance of TItem. |

## Examples

Basic data grid with sorting, paging, and filtering:

```razor
<RadzenDataGrid Data=@orders TItem="Order" AllowSorting="true" AllowPaging="true" AllowFiltering="true" PageSize="10">
    <Columns>
        <RadzenDataGridColumn TItem="Order" Property="OrderId" Title="Order ID" />
        <RadzenDataGridColumn TItem="Order" Property="OrderDate" Title="Order Date" FormatString="{0:d}" />
        <RadzenDataGridColumn TItem="Order" Property="CustomerName" Title="Customer" />
        <RadzenDataGridColumn TItem="Order" Property="Total" Title="Total" FormatString="{0:C}" />
    </Columns>
</RadzenDataGrid>
```

Grid with inline editing:

```razor
<RadzenDataGrid @ref=grid Data=@orders TItem="Order" EditMode="DataGridEditMode.Single">
    <Columns>
        <RadzenDataGridColumn TItem="Order" Property="OrderId" Title="ID" Frozen="true">
            <EditTemplate Context="order">
                <RadzenNumeric @bind-Value="order.OrderId" Style="width:100%" />
            </EditTemplate>
        </RadzenDataGridColumn>
        <RadzenDataGridColumn TItem="Order" Context="order" Filterable="false" Sortable="false" TextAlign="TextAlign.Right">
            <Template Context="order">
                <RadzenButton Icon="edit" ButtonStyle="ButtonStyle.Light" Click="@(args => EditRow(order))" />
            </Template>
            <EditTemplate Context="order">
                <RadzenButton Icon="check" ButtonStyle="ButtonStyle.Success" Click="@(args => SaveRow(order))" />
                <RadzenButton Icon="close" ButtonStyle="ButtonStyle.Light" Click="@(args => CancelEdit(order))" />
            </EditTemplate>
        </RadzenDataGridColumn>
    </Columns>
</RadzenDataGrid>
```

Server-side data with LoadData:

```razor
<RadzenDataGrid Data=@orders TItem="Order" LoadData=@LoadData Count=@count IsLoading=@isLoading
                AllowSorting="true" AllowFiltering="true" AllowPaging="true" PageSize="20">
    <Columns>
        <RadzenDataGridColumn TItem="Order" Property="OrderId" Title="ID" />
    </Columns>
</RadzenDataGrid>

@code {
    IEnumerable<Order> orders;
    int count;
    bool isLoading;

    async Task LoadData(LoadDataArgs args)
    {
        isLoading = true;
        var result = await orderService.GetOrders(args.Skip, args.Top, args.OrderBy, args.Filter);
        orders = result.Data;
        count = result.Count;
        isLoading = false;
    }
}
```

## Constructors

| Constructor | Description |
|-------------|-------------|
| `public RadzenDataGrid<TItem>()` | A powerful data grid component for displaying and manipulating tabular data with support for sorting, filtering, paging, grouping, editing, and selection. RadzenDataGrid provides a full-featured table with inline editing, master-detail views, virtualization, export capabilities, and extensive customization options. Supports single/multiple column sorting, simple/advanced filtering, grouping with aggregation, inline/cell editing with validation, and single/multiple row selection with checkbox columns. Features on-demand data loading via LoadData event for server-side operations, export to Excel and CSV formats, column/row templates, group headers/footers, and density modes (Default/Compact) for responsive layouts. The grid can work with in-memory collections or load data on-demand from APIs. Columns are defined using RadzenDataGridColumn components within the Columns template. |

## Properties

| Property | Type | Description |
|------|------|-------------|
| AllColumnsText | `string` | Gets or sets the column picker all columns text. |
| AllGroupsExpanded | `bool?` | Gets or sets a value indicating whether all groups should be expanded when DataGrid is grouped. |
| AllGroupsExpandedChanged | `EventCallback<bool?>` | Gets or sets the AllGroupsExpanded changed callback. |
| AllowAlternatingRows | `bool` | Gets or sets a value indicating whether DataGrid should use alternating row styles. |
| AllowColumnPicking | `bool` | Gets or sets a value indicating whether column picking is allowed. |
| AllowColumnReorder | `bool` | Gets or sets a value indicating whether column reorder is allowed. |
| AllowColumnResize | `bool` | Gets or sets a value indicating whether column resizing is allowed. |
| AllowColumnVirtualization | `bool` | Gets or sets whether the DataGrid renders only the columns that are scrolled into view, plus the frozen columns. Columns outside the view are replaced with spacer cells, which keeps grids with hundreds of columns responsive. Every column gets a pixel width: a px or %Width, the grid ColumnWidth, or 200px when neither is set. Ignored when Responsive is enabled. |
| AllowCompositeDataCells | `bool` | Gets or sets a value indicating whether DataGrid data cells will follow the header cells structure in composite columns. |
| AllowFilterDateInput | `bool` | Gets or sets a value indicating whether input is allowed in filter DatePicker. |
| AllowFiltering | `bool` | Gets or sets a value indicating whether filtering is allowed. |
| AllowGrouping | `bool` | Gets or sets a value indicating whether grouping is allowed. |
| AllowMultiColumnSorting | `bool` | Gets or sets a value indicating whether multi column sorting is allowed. |
| AllowPickAllColumns | `bool` | Gets or sets a value indicating whether user can pick all columns in column picker. |
| AllowRowSelectOnRowClick | `bool` | Gets or sets a value indicating whether DataGrid row can be selected on row click. |
| AllowSorting | `bool` | Gets or sets a value indicating whether sorting is allowed. |
| AllowSortingColumnPicker | `bool` | Gets or sets a value indicating whether sorting in column picker is allowed. |
| AllowVirtualization | `bool` | Gets or sets whether the DataGrid uses virtualization to improve performance with large datasets. When enabled, only visible rows are rendered in the DOM, with additional rows loaded as the user scrolls. Virtualization significantly reduces memory usage and initial render time for grids with thousands of rows. |
| AndOperatorText | `string` | Gets or sets the and operator text. |
| ApplyFilterText | `string` | Gets or sets the apply filter text. |
| AriaLabel | `string` | Gets or sets the accessible name of the grid, exposed via the aria-label attribute on the role="grid" or role="treegrid" element. When not set, an aria-label attribute supplied through Attributes is used. |
| AriaLabelledBy | `string` | Gets or sets the id of the element that labels the grid, exposed via the aria-labelledby attribute on the role="grid" or role="treegrid" element. When not set, an aria-labelledby attribute supplied through Attributes is used. |
| AutoApplyCheckBoxListFilter | `bool` | Gets or sets whether CheckBoxList column filters are applied immediately as options are selected, instead of requiring the filter popup's Apply button. Default is false. |
| CellClick | `EventCallback<DataGridCellMouseEventArgs<TItem>>` | Gets or sets the cell click callback. |
| CellContextMenu | `EventCallback<DataGridCellMouseEventArgs<TItem>>` | Gets or sets the row click callback. |
| CellDoubleClick | `EventCallback<DataGridCellMouseEventArgs<TItem>>` | Gets or sets the cell double click callback. |
| CellRender | `Action<DataGridCellRenderEventArgs<TItem>>` | Gets or sets the cell render callback. Use it to set cell attributes. |
| ClearFilterText | `string` | Gets or sets the clear filter text. |
| CollapseAllGroupsTitle | `string` | Gets or sets the title attribute of the collapse all groups button. |
| CollapseAllTitle | `string` | Gets or sets the title attribute of the collapse all button. |
| ColumnReordered | `EventCallback<DataGridColumnReorderedEventArgs<TItem>>` | Gets or sets the column reordered callback. |
| ColumnReordering | `EventCallback<DataGridColumnReorderingEventArgs<TItem>>` | Gets or sets the column reordering callback. |
| ColumnResized | `EventCallback<DataGridColumnResizedEventArgs<TItem>>` | Gets or sets the column resized callback. |
| ColumnVirtualizationOverscanCount | `int` | Gets or sets the number of additional columns rendered before and after the visible columns when AllowColumnVirtualization is enabled. A higher value reduces blank space during fast horizontal scrolling. |
| ColumnWidth | `string` | Gets or sets the width of all columns. |
| Columns | `RenderFragment` | Gets or sets the columns. |
| ColumnsCollection | `IList<RadzenDataGridColumn<TItem>>` | Gets the columns collection. |
| ColumnsPickerAllowFiltering | `bool` | Gets or sets a value indicating whether user can filter columns in column picker. |
| ColumnsPickerMaxSelectedLabels | `int` | Gets or sets the column picker max selected labels. |
| ColumnsShowingText | `string` | Gets or sets the column picker columns showing text. |
| ColumnsText | `string` | Gets or sets the column picker columns text. |
| ContainsText | `string` | Gets or sets the contains text. |
| CustomText | `string` | Gets or sets the custom filter operator text. |
| DoesNotContainText | `string` | Gets or sets the does not contain text. |
| EditMode | [`DataGridEditMode`](https://blazor.radzen.com/docs/api/Radzen.DataGridEditMode.md) | Gets or sets the edit mode. |
| EditTemplate | `RenderFragment<TItem>` | Gets or sets the edit template. |
| EmptyTemplate | `RenderFragment` | Gets or sets the empty template shown when Data is empty collection. |
| EmptyText | `string` | Gets or sets the empty text shown when Data is empty collection. |
| EndsWithText | `string` | Gets or sets the ends with text. |
| EnumFilterSelectText | `string` | Gets or sets the enum filter select text. |
| EnumFilterTranslationFunc | `Func<string, string>` | Gets or sets a function that translates the display text of enum values shown in the cells, the exported values, the enum filter options and the check-box list filter. It receives the DisplayAttribute description or name, the DescriptionAttribute description or the member name of the enum value. Use EnumTranslationFunc when the translation needs the enum value or its type. |
| EnumNullFilterText | `string` | Gets or sets the nullable enum for null value filter text. |
| EnumTranslationFunc | `Func<Enum, string>` | Gets or sets a function that translates enum values shown in the cells, the exported values, the enum filter options and the check-box list filter. It receives the enum value itself, so it can tell apart members of different enums that share a name and can call a typed localization service. It takes precedence over EnumFilterTranslationFunc; return null to fall back to the display text and EnumFilterTranslationFunc for that value. |
| EqualsText | `string` | Gets or sets the equals text. |
| ExpandAllGroupsTitle | `string` | Gets or sets the title attribute of the expand all groups button. |
| ExpandAllTitle | `string` | Gets or sets the title attribute of the expand all button. |
| ExpandChildItemAriaLabel | `string` | Gets or sets the expand child item aria label text. |
| ExpandGroupAriaLabel | `string` | Gets or sets the expand group aria label text. |
| ExpandMode | [`DataGridExpandMode`](https://blazor.radzen.com/docs/api/Radzen.DataGridExpandMode.md) | Gets or sets the expand mode. |
| Filter | `EventCallback<DataGridColumnFilterEventArgs<TItem>>` | Gets or sets the column filter callback. |
| FilterAsYouType | `bool` | Gets or sets a value indicating whether filtering is performed as you type. Set to true by default. When set to false, the filter is only applied when the user presses Enter or leaves the filter input. |
| FilterCaseSensitivity | [`FilterCaseSensitivity`](https://blazor.radzen.com/docs/api/Radzen.FilterCaseSensitivity.md) | Gets or sets the filter case sensitivity. |
| FilterCleared | `EventCallback<DataGridColumnFilterEventArgs<TItem>>` | Gets or sets the column filter cleared callback. |
| FilterDateFormat | `string` | Gets or sets the filter date format. |
| FilterDelay | `int` | Gets or sets the filter delay. |
| FilterIcon | `string` | Gets or set the filter icon to use. |
| FilterMode | [`FilterMode`](https://blazor.radzen.com/docs/api/Radzen.FilterMode.md) | Gets or sets the filter mode. |
| FilterOperatorAriaLabel | `string` | Gets or sets the column filter value aria label text. |
| FilterPopupRenderMode | [`PopupRenderMode`](https://blazor.radzen.com/docs/api/Radzen.PopupRenderMode.md) | Gets or sets the render mode. |
| FilterRowActive | `bool` | Gets whether the filter row (containing filter input controls for each column) is currently visible in the DataGrid. The filter row appears below the header row when filtering is enabled and at least one column is filterable. |
| FilterText | `string` | Gets or sets the filter text. |
| FilterToggleAriaLabel | `string` | Gets or sets the date simple filter toggle aria label text. |
| FilterValueAriaLabel | `string` | Gets or sets the column filter value aria label text. |
| FooterCellRender | `Action<DataGridCellRenderEventArgs<TItem>>` | Gets or sets the footer cell render callback. Use it to set footer cell attributes. |
| FooterTemplate | `RenderFragment` | Gives the grid a custom footer, allowing the adding of components to create custom tool bars or custom pagination |
| GotoFirstPageOnSort | `bool` | Gets or sets the ability to automatically goto the first page when sorting is changed. |
| GreaterThanOrEqualsText | `string` | Gets or sets the greater than or equals text. |
| GreaterThanText | `string` | Gets or sets the greater than text. |
| GridLines | [`DataGridGridLines`](https://blazor.radzen.com/docs/api/Radzen.DataGridGridLines.md) | Gets or sets the grid lines. |
| Group | `EventCallback<DataGridColumnGroupEventArgs<TItem>>` | Gets or sets the column group callback. |
| GroupFootersAlwaysVisible | `bool` | Gets or sets a value indicating whether group footers are visible even when the group is collapsed. |
| GroupHeaderTemplate | `RenderFragment<Group>` | Gets or sets the group header template. |
| GroupHeaderToggleTemplate | `RenderFragment<ValueTuple<Group, RadzenDataGridGroupRow<TItem>>>` | Gets or sets the group header with option to add custom toggle visibility button template. |
| GroupPanelText | `string` | Gets or sets the group panel text. |
| GroupRowCollapse | `EventCallback<Group>` | Gets or sets the group row collapse callback. |
| GroupRowExpand | `EventCallback<Group>` | Gets or sets the group row expand callback. |
| GroupRowRender | `Action<GroupRowRenderEventArgs>` | Gets or sets the group row render callback. Use it to set group row attributes. |
| GroupedPagedView | `IEnumerable<GroupResult>` | Gets the view grouped and paged. |
| Groups | `ObservableCollection<GroupDescriptor>` | Gets or sets the group descriptors. |
| HeaderCellRender | `Action<DataGridCellRenderEventArgs<TItem>>` | Gets or sets the header cell render callback. Use it to set header cell attributes. |
| HeaderTemplate | `RenderFragment` | Gives the grid a custom header, allowing the adding of components to create custom tool bars in addtion to column grouping and column picker |
| HideGroupedColumn | `bool` | Gets or sets a value indicating whether grouped column should be hidden. |
| InText | `string` | Gets or sets the in operator text. |
| IsEmptyText | `string` | Gets or sets the is empty text. |
| IsLoading | `bool` | Gets or sets a value indicating whether this instance loading indicator is shown. |
| IsNotEmptyText | `string` | Gets or sets the is not empty text. |
| IsNotNullText | `string` | Gets or sets the not null text. |
| IsNullText | `string` | Gets or sets the is null text. |
| IsValid | `bool` | Gets whether all inline edit validators in the DataGrid are currently valid. Use this property to check validation state before saving edited rows. |
| KeyDown | `EventCallback<KeyboardEventArgs>` | Gets or sets key down callback. |
| KeyProperty | `string` | Gets or sets the key property. |
| LessThanOrEqualsText | `string` | Gets or sets the less than or equals text. |
| LessThanText | `string` | Gets or sets the less than text. |
| LoadChildData | `EventCallback<DataGridLoadChildDataEventArgs<TItem>>` | Gets or sets the load child data callback. |
| LoadColumnFilterData | `EventCallback<DataGridLoadColumnFilterDataEventArgs<TItem>>` | Gets or sets the callback used to load column filter data for DataGrid FilterMode.CheckBoxList filter mode. |
| LoadSettings | `Action<DataGridLoadSettingsEventArgs>` | Gets or sets the load settings callback. |
| LogicalFilterOperator | [`LogicalFilterOperator`](https://blazor.radzen.com/docs/api/Radzen.LogicalFilterOperator.md) | Gets or sets the logical filter operator. |
| LogicalOperatorAriaLabel | `string` | Gets or sets the column logical filter value aria label text. |
| NotEqualsText | `string` | Gets or sets the not equals text. |
| NotInText | `string` | Gets or sets the not in operator text. |
| OrOperatorText | `string` | Gets or sets the or operator text. |
| PageSizeChanged | `EventCallback<int>` | Gets or sets the page size changed callback. |
| PickedColumnsChanged | `EventCallback<DataGridPickedColumnsChangedEventArgs<TItem>>` | Gets or sets the picked columns changed callback. |
| Query | [`Query`](https://blazor.radzen.com/docs/api/Radzen.Query.md) | Gets the query. |
| QueryOnlyVisibleColumns | `bool` | Gets or sets a value indicating whether only visible columns are included in the query. |
| RemoveGroupAriaLabel | `string` | Gets or sets the remove group button aria label text. |
| Render | `Action<DataGridRenderEventArgs<TItem>>` | Gets or sets the render callback. |
| RenderAsync | `Func<DataGridRenderEventArgs<TItem>, Task>` | Gets or sets the render async callback. |
| Responsive | `bool` | Gets or sets a value indicating whether DataGrid is responsive. |
| RowClick | `EventCallback<DataGridRowMouseEventArgs<TItem>>` | Gets or sets the row click callback. |
| RowCollapse | `EventCallback<TItem>` | Gets or sets the row collapse callback. |
| RowCreate | `EventCallback<TItem>` | Gets or sets the row create callback. |
| RowDeselect | `EventCallback<TItem>` | Gets or sets the row deselect callback. |
| RowDoubleClick | `EventCallback<DataGridRowMouseEventArgs<TItem>>` | Gets or sets the row double click callback. |
| RowEdit | `EventCallback<TItem>` | Gets or sets the row edit callback. |
| RowExpand | `EventCallback<TItem>` | Gets or sets the row expand callback. |
| RowRender | `Action<RowRenderEventArgs<TItem>>` | Gets or sets the row render callback. Use it to set row attributes. |
| RowSelect | `EventCallback<TItem>` | Gets or sets the row select callback. |
| RowUpdate | `EventCallback<TItem>` | Gets or sets the row update callback. |
| SecondFilterOperatorAriaLabel | `string` | Gets or sets the column filter value aria label text. |
| SecondFilterValueAriaLabel | `string` | Gets or sets the column filter value aria label text. |
| SelectVisibleColumnsAriaLabel | `string` | Gets or sets the select visible columns aria label text. |
| SelectionMode | [`DataGridSelectionMode`](https://blazor.radzen.com/docs/api/Radzen.DataGridSelectionMode.md) | Gets or sets the selection mode. |
| Settings | [`DataGridSettings`](https://blazor.radzen.com/docs/api/Radzen.DataGridSettings.md) | Gets or sets DataGrid settings. |
| SettingsChanged | `EventCallback<DataGridSettings>` | Gets or sets the settings changed callback. |
| ShowCellDataAsTooltip | `bool` | Gets or sets a value indicating whether cell data should be shown as tooltip. |
| ShowColumnTitleAsTooltip | `bool` | Gets or sets a value indicating whether column title should be shown as tooltip. |
| ShowEmptyMessage | `bool` | Gets or sets a value indicating whether DataGrid data body show empty message. |
| ShowExpandAll | `bool` | Gets or sets a value indicating whether all rows can be expanded at once from the header. Setting is only available when ExpandMode is set to DataGridExpandMode.Multiple. |
| ShowExpandColumn | `bool` | Gets or sets whether the expandable indicator column is visible. |
| ShowGroupExpandAll | `bool` | Gets or sets a value indicating whether all groups can be expanded or collapsed at once from the header of the group expand column. The button is rendered only when the DataGrid is grouped and ShowGroupExpandColumn is true. |
| ShowGroupExpandColumn | `bool` | Gets or sets a value indicating whether to show group visibility column |
| ShowHeader | `bool` | Gets or sets value if headers are shown. |
| ShowMultiColumnSortingIndex | `bool` | Gets or sets a value indicating whether multi column sorting index is shown. |
| Sort | `EventCallback<DataGridColumnSortEventArgs<TItem>>` | Gets or sets the column sort callback. |
| Sorts | `ObservableCollection<SortDescriptor>` | Gets or sets the sort descriptors. |
| StartsWithText | `string` | Gets or sets the starts with text. |
| TabIndex | `int` | Gets or sets the tabindex applied to the grid element. Set to 0 by default so the grid is a tab stop. Embedding components can set it to -1 to remove the grid from the tab order. |
| Value | `IList<TItem>` | Gets or sets the selected item. |
| ValueChanged | `EventCallback<IList<TItem>>` | Gets or sets the value changed callback. |
| View | `IQueryable<TItem>` | Gets the view - Data with sorting, filtering and paging applied. |
| VirtualizationOverscanCount | `int` | Gets or sets the number of additional rows to render before and after the visible viewport when virtualization is enabled. A higher overscan count reduces the chance of seeing blank space during fast scrolling, but increases the number of rendered elements. The optimal value depends on row height and typical scroll speed. |
| Virtualize | `Virtualization.Virtualize<TItem>` | Gets a reference to the underlying Blazor Virtualize component used for row virtualization. This reference can be used to programmatically control virtualization behavior or access virtualization state. Only available when AllowVirtualization is enabled and items are not grouped. |

## Methods

| Method | Returns | Description |
|------|---------|-------------|
| `AddContextMenu()` | `Task` | Adds context menu for this component. |
| `ApplyDateFilterByFilterOperator(RadzenDataGridColumn<TItem> column, FilterOperator filterOperator)` | `void` | Applies the date filter by filter operator. Parameters: `column`: The column. `filterOperator`: The filter operator. |
| `ApplyFilter(RadzenDataGridColumn<TItem> column, bool closePopup)` | `Task` | Apply filter to the specified column |
| `BuildRenderTree(Rendering.RenderTreeBuilder __builder)` | `void` |  |
| `CancelEditRow(TItem item)` | `void` | Cancels the edited row. Parameters: `item`: The item. |
| `CancelEditRows(IEnumerable<TItem> items)` | `void` | Cancels the edit of a range of rows. Parameters: `items`: The range of rows. |
| `ClearFilter(RadzenDataGridColumn<TItem> column, bool closePopup, bool shouldReload)` | `Task` | ?lear filter on the specified column |
| `CollapseAll()` | `Task` | Collapse all rows that are expanded |
| `CollapseRows(IEnumerable<TItem> items)` | `Task` | Collapse a range of rows. Parameters: `items`: The range of rows. |
| `DateFilterOperatorStyle(RadzenDataGridColumn<TItem> column, FilterOperator value)` | `string` | The filter operator style for dates. Parameters: `column`: The column. `value`: The value. Returns: System.String. |
| `Dispose()` | `void` |  |
| `EditRow(TItem item)` | `Task` | Edits the row. Parameters: `item`: The item. |
| `EditRows(IEnumerable<TItem> items)` | `Task` | Edits a range of rows. Parameters: `items`: The range of rows. |
| `ExpandGroupItem(RadzenDataGridGroupRow<TItem> item, bool? expandedOnLoad)` | `Task` | Expand group item. |
| `ExpandRow(TItem item)` | `Task` | Expands the row to show the content defined in Template property. Parameters: `item`: The item. |
| `ExpandRows(IEnumerable<TItem> items)` | `Task` | Expands a range of rows. Parameters: `items`: The range of rows. |
| `ExportToCsvAsync(string fileName, DataGridCsvExportOptions options)` | `Task` | Exports the DataGrid to a CSV file and downloads it in the browser. Parameters: `fileName`: The downloaded file name. `options`: The CSV export options. Returns: A task that represents the asynchronous operation. |
| `ExportToExcelAsync(string fileName, DataGridExcelExportOptions options)` | `Task` | Exports the DataGrid to an Excel workbook and downloads it in the browser. Parameters: `fileName`: The downloaded file name. `options`: The export options. Returns: A task that represents the asynchronous operation. |
| `GetComponentCssClass()` | `string` |  |
| `InsertAfterRow(TItem itemToInsert, TItem rowItem)` | `Task` | Inserts new row after specific row item. Parameters: `itemToInsert`: The item. `rowItem`: Row item to insert after |
| `InsertRow(TItem item)` | `Task` | Inserts new row. Parameters: `item`: The item. |
| `IsRowExpanded(TItem item)` | `bool` | Gets boolean value indicating if the row is expanded or not. Parameters: `item`: The item. |
| `IsRowInEditMode(TItem item)` | `bool` | Determines whether row in edit mode. Parameters: `item`: The item. Returns: true if row in edit mode; otherwise, false. |
| `IsValidAsync()` | `Task<bool>` | Validates all rows that are being edited and awaits their asynchronous validators. Use this method instead of IsValid when the edited rows use asynchronous validation. Returns: true if all edit form validators are valid; otherwise, false. Returns true if no rows are being edited. |
| `ItemEquals(TItem item, TItem otherItem)` | `bool` | Compares two items for equality. When KeyProperty is set the comparison uses the key value (null-safe — both-null keys are equal, one-null is not), otherwise falls back to Object). Parameters: `item`: The first item `otherItem`: The second item Returns: Are items equal |
| `OnAfterRenderAsync(bool firstRender)` | `Task` |  |
| `OnBecameInvisible()` | `void` |  |
| `OnBlur(FocusEventArgs args)` | `Task` | Handles the blur event. Parameters: `args`: The FocusEventArgs instance containing the event data. |
| `OnCollectionChanged(object sender, Collections.Specialized.NotifyCollectionChangedEventArgs args)` | `void` |  |
| `OnColumnDropToGroup()` | `Task` | Called from JS when a touch-initiated column reorder drop lands on the group panel. |
| `OnColumnFocus(int columnIndex)` | `void` | Called from JS when focus moves to a cell of another column while AllowColumnVirtualization is enabled. Parameters: `columnIndex`: Index of the visible column that contains the focus, or -1 when focus left the cells. |
| `OnColumnReorderEnded(int columnIndex)` | `Task` | Called from JS when a touch-initiated column reorder drop lands on a target column. Parameters: `columnIndex`: Index of the destination column. |
| `OnColumnResized(int columnIndex, double value)` | `Task` | Called when column is resized. Parameters: `columnIndex`: Index of the column. `value`: The value. |
| `OnColumnScroll(double scrollLeft, double width)` | `void` | Called from JS when the grid is scrolled horizontally or resized while AllowColumnVirtualization is enabled. Parameters: `scrollLeft`: The horizontal scroll offset from the inline start edge. `width`: The width of the scrollable area. |
| `OnColumnsResized(int columnIndex, double value, Double[] values)` | `Task` | Called when a column is resized and the widths of all visible columns are known. Parameters: `columnIndex`: Index of the resized column. `value`: The resized column width. `values`: The widths of all visible columns. |
| `OnContextMenu(MouseEventArgs args)` | `Task` | Raises [ContextMenu](https://blazor.radzen.com/docs/api/Radzen.ContextMenu.md). Parameters: `args`: The MouseEventArgs instance containing the event data. |
| `OnDataChanged()` | `void` | Called when data is changed. |
| `OnFilter(ChangeEventArgs args, RadzenDataGridColumn<TItem> column, bool force, bool isFirst)` | `Task` | Called when filter key pressed. Parameters: `args`: The EventArgs instance containing the event data. `column`: The column. |
| `OnFilterKeyPress(EventArgs args, RadzenDataGridColumn<TItem> column)` | `void` | Called when filter key pressed. Parameters: `args`: The EventArgs instance containing the event data. `column`: The column. |
| `OnInitialized()` | `void` |  |
| `OnKeyDown(KeyboardEventArgs args)` | `Task` | Handles the key down event. Parameters: `args`: The KeyboardEventArgs instance containing the event data. |
| `OnPageSizeChanged(int value)` | `Task` |  |
| `OnParametersSetAsync()` | `Task` | Called when parameters set asynchronous. Returns: Task. |
| `OrderBy(string property)` | `void` | Orders the DataGrid by property name. Parameters: `property`: The property name. |
| `OrderByDescending(string property)` | `void` | Orders descending the DataGrid by property name. Parameters: `property`: The property name. |
| `RefreshDataAsync()` | `Task` | Clears the internal data cache and refreshes the DataGrid, reloading data from the source. When virtualization is enabled, this method refreshes the Virtualize component. Otherwise, it triggers a standard reload. Call this method after external data changes to ensure the grid displays current data. Returns: A task representing the asynchronous refresh operation. |
| `Reload()` | `Task` | Reloads this instance. |
| `ReloadSettings(bool forceReload)` | `Task` | Force load of the DataGrid Settings. This method triggers a reload of the DataGrid settings, optionally forcing a reload even if the settings are already loaded. Parameters: `forceReload`: If true, forces a reload of the settings regardless of their current state. Default is false. |
| `Reset(bool resetColumnState, bool resetRowState)` | `void` | Resets the internal LoadData state, forcing the next data operation to reload from the source. This is useful when you've made changes to the underlying data source and want to ensure the next load operation fetches fresh data instead of using cached arguments. Typically called before RefreshDataAsync or when manually managing data reload. |
| `ResetLoadData()` | `void` | Resets the internal LoadData state, forcing the next data operation to reload from the source. This is useful when you've made changes to the underlying data source and want to ensure the next load operation fetches fresh data instead of using cached arguments. Typically called before RefreshDataAsync or when manually managing data reload. |
| `SaveSettings()` | `void` | Saves DataGrid settings as JSON string. |
| `SelectRow(TItem item, bool raiseEvent)` | `Task` | Selects the row. Parameters: `item`: The item. `raiseEvent`: Should raise RowSelect event. |
| `SetColumnFilterValueFromSettings(RadzenDataGridColumn<TItem> gridColumn, DataGridColumnSettings columnSettings, bool isFirst)` | `bool` | Override this method to customize how filter values are serialized back typed from the settings. Parameters: `gridColumn`: Grid colum to set. `columnSettings`: Setting of the column. `isFirst`: Handle first or second filter value. Returns: Returns true if state should update. |
| `SetParametersAsync(ParameterView parameters)` | `Task` |  |
| `ShouldRender()` | `bool` |  |
| `ToWorkbookAsync(DataGridExcelExportOptions options)` | `Task<Documents.Spreadsheet.Workbook>` | Creates an Excel workbook containing the exported DataGrid rows. Parameters: `options`: The export options. Returns: The workbook. |
| `ToggleAllGroupsExpand()` | `Task` | Expands all groups when any group is collapsed; collapses all groups when every group is expanded. Updates AllGroupsExpanded and raises AllGroupsExpandedChanged. |
| `UpdatePickableColumns()` | `void` | Updates pickable columns. |
| `UpdateRow(TItem item)` | `Task` | Updates the row. Parameters: `item`: The item. |

## Inherited Members

- From [PagedDataBoundComponent<TItem>](https://blazor.radzen.com/docs/api/Radzen.PagedDataBoundComponent-1.md): AllowPaging, CalculatePager, Count, CurrentPage, Data, Density, FirstPage, FirstPageAriaLabel, FirstPageTitle, GoToPage, LastPage, LastPageAriaLabel, LastPageTitle, LoadData, LoadingTemplate, NextPage, NextPageAriaLabel, NextPageLabel, NextPageTitle, OnPageChanged, Page, PageAriaLabelFormat, PageNumbersCount, PageSize, PageSizeOptions, PageSizeText, PageTitleFormat, PagedView, PagerAlwaysVisible, PagerHorizontalAlign, PagerInputSize, PagerPosition, PagingSummaryFormat, PagingSummaryTemplate, PrevPage, PrevPageAriaLabel, PrevPageLabel, PrevPageTitle, ShowPagingSummary, Template, bottomPager, skip, topPager
- From [RadzenComponent](https://blazor.radzen.com/docs/api/Radzen.RadzenComponent.md): Attributes, ContextMenu, Culture, CurrentStyle, Debounce, DefaultCulture, DefaultUICulture, Element, GetCssClass, GetId, GetIdAttribute, IsJSRuntimeAvailable, JSRuntime, Localize, MouseEnter, MouseLeave, OnMouseEnter, OnMouseLeave, RaiseContextMenu, RaiseMouseEnter, RaiseMouseLeave, Reference, Style, UICulture, UniqueID, Visible
- From ComponentBase: Assets, AssignedRenderMode, DispatchExceptionAsync, InvokeAsync, OnAfterRender, OnInitializedAsync, OnParametersSet, RendererInfo, StateHasChanged

