Class 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.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
[CascadingTypeParameter("TItem")]
public class RadzenDataGrid<TItem> : PagedDataBoundComponent<TItem>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
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:
<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:
<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:
<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
RadzenDataGrid()
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.
Declaration
public RadzenDataGrid()
Examples
Basic data grid with sorting, paging, and filtering:
<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:
<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:
<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;
}
}
Properties
AllColumnsText
Gets or sets the column picker all columns text.
Declaration
[Parameter]
public string AllColumnsText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The column picker all columns text. |
AllGroupsExpanded
Gets or sets a value indicating whether all groups should be expanded when DataGrid is grouped.
Declaration
[Parameter]
public bool? AllGroupsExpanded { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
|
AllGroupsExpandedChanged
Gets or sets the AllGroupsExpanded changed callback.
Declaration
[Parameter]
public EventCallback<bool?> AllGroupsExpandedChanged { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<bool?> | The AllGroupsExpanded changed callback. |
AllowAlternatingRows
Gets or sets a value indicating whether DataGrid should use alternating row styles.
Declaration
[Parameter]
public bool AllowAlternatingRows { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowColumnPicking
Gets or sets a value indicating whether column picking is allowed.
Declaration
[Parameter]
public bool AllowColumnPicking { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowColumnReorder
Gets or sets a value indicating whether column reorder is allowed.
Declaration
[Parameter]
public bool AllowColumnReorder { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowColumnResize
Gets or sets a value indicating whether column resizing is allowed.
Declaration
[Parameter]
public bool AllowColumnResize { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowCompositeDataCells
Gets or sets a value indicating whether DataGrid data cells will follow the header cells structure in composite columns.
Declaration
[Parameter]
public bool AllowCompositeDataCells { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowFilterDateInput
Gets or sets a value indicating whether input is allowed in filter DatePicker.
Declaration
[Parameter]
public bool AllowFilterDateInput { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowFiltering
Gets or sets a value indicating whether filtering is allowed.
Declaration
[Parameter]
public bool AllowFiltering { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowGrouping
Gets or sets a value indicating whether grouping is allowed.
Declaration
[Parameter]
public bool AllowGrouping { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowMultiColumnSorting
Gets or sets a value indicating whether multi column sorting is allowed.
Declaration
[Parameter]
public bool AllowMultiColumnSorting { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowPickAllColumns
Gets or sets a value indicating whether user can pick all columns in column picker.
Declaration
[Parameter]
public bool AllowPickAllColumns { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowRowSelectOnRowClick
Gets or sets a value indicating whether DataGrid row can be selected on row click.
Declaration
[Parameter]
public bool AllowRowSelectOnRowClick { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowSorting
Gets or sets a value indicating whether sorting is allowed.
Declaration
[Parameter]
public bool AllowSorting { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AllowVirtualization
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.
Declaration
[Parameter]
public bool AllowVirtualization { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
AndOperatorText
Gets or sets the and operator text.
Declaration
[Parameter]
public string AndOperatorText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The and operator text. |
ApplyFilterText
Gets or sets the apply filter text.
Declaration
[Parameter]
public string ApplyFilterText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The apply filter text. |
CellClick
Gets or sets the cell click callback.
Declaration
[Parameter]
public EventCallback<DataGridCellMouseEventArgs<TItem>> CellClick { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridCellMouseEventArgs<TItem>> | The cell click callback. |
CellContextMenu
Gets or sets the row click callback.
Declaration
[Parameter]
public EventCallback<DataGridCellMouseEventArgs<TItem>> CellContextMenu { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridCellMouseEventArgs<TItem>> | The row click callback. |
CellDoubleClick
Gets or sets the cell double click callback.
Declaration
[Parameter]
public EventCallback<DataGridCellMouseEventArgs<TItem>> CellDoubleClick { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridCellMouseEventArgs<TItem>> | The cell double click callback. |
CellRender
Gets or sets the cell render callback. Use it to set cell attributes.
Declaration
[Parameter]
public Action<DataGridCellRenderEventArgs<TItem>> CellRender { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<DataGridCellRenderEventArgs<TItem>> | The cell render callback. |
ClearFilterText
Gets or sets the clear filter text.
Declaration
[Parameter]
public string ClearFilterText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The clear filter text. |
ColumnReordered
Gets or sets the column reordered callback.
Declaration
[Parameter]
public EventCallback<DataGridColumnReorderedEventArgs<TItem>> ColumnReordered { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridColumnReorderedEventArgs<TItem>> | The column reordered callback. |
ColumnReordering
Gets or sets the column reordering callback.
Declaration
[Parameter]
public EventCallback<DataGridColumnReorderingEventArgs<TItem>> ColumnReordering { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridColumnReorderingEventArgs<TItem>> | The column reordering callback. |
ColumnResized
Gets or sets the column resized callback.
Declaration
[Parameter]
public EventCallback<DataGridColumnResizedEventArgs<TItem>> ColumnResized { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridColumnResizedEventArgs<TItem>> | The column resized callback. |
ColumnWidth
Gets or sets the width of all columns.
Declaration
[Parameter]
public string ColumnWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The width of the columns. |
Columns
Gets or sets the columns.
Declaration
[Parameter]
public RenderFragment Columns { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment | The columns. |
ColumnsCollection
Gets the columns collection.
Declaration
public IList<RadzenDataGridColumn<TItem>> ColumnsCollection { get; }
Property Value
| Type | Description |
|---|---|
| IList<RadzenDataGridColumn<TItem>> | The columns collection. |
ColumnsPickerAllowFiltering
Gets or sets a value indicating whether user can filter columns in column picker.
Declaration
[Parameter]
public bool ColumnsPickerAllowFiltering { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
ColumnsPickerMaxSelectedLabels
Gets or sets the column picker max selected labels.
Declaration
[Parameter]
public int ColumnsPickerMaxSelectedLabels { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The column picker max selected labels. |
ColumnsShowingText
Gets or sets the column picker columns showing text.
Declaration
[Parameter]
public string ColumnsShowingText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The column picker columns showing text. |
ColumnsText
Gets or sets the column picker columns text.
Declaration
[Parameter]
public string ColumnsText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The column picker columns text. |
ContainsText
Gets or sets the contains text.
Declaration
[Parameter]
public string ContainsText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The contains text. |
CustomText
Gets or sets the custom filter operator text.
Declaration
[Parameter]
public string CustomText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The custom filter operator text. |
DoesNotContainText
Gets or sets the does not contain text.
Declaration
[Parameter]
public string DoesNotContainText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The does not contain text. |
EditMode
Gets or sets the edit mode.
Declaration
[Parameter]
public DataGridEditMode EditMode { get; set; }
Property Value
| Type | Description |
|---|---|
| DataGridEditMode | The edit mode. |
EditTemplate
Gets or sets the edit template.
Declaration
[Parameter]
public RenderFragment<TItem> EditTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment<TItem> | The template. |
EmptyTemplate
Gets or sets the empty template shown when Data is empty collection.
Declaration
[Parameter]
public RenderFragment EmptyTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment | The empty template. |
EmptyText
Gets or sets the empty text shown when Data is empty collection.
Declaration
[Parameter]
public string EmptyText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The empty text. |
EndsWithText
Gets or sets the ends with text.
Declaration
[Parameter]
public string EndsWithText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The ends with text. |
EnumFilterSelectText
Gets or sets the enum filter select text.
Declaration
[Parameter]
public string EnumFilterSelectText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The enum filter select text. |
EnumFilterTranslationFunc
Allows to define a custom function for enums DisplayAttribute Description property value translation in datagrid Enum filters.
Declaration
[Parameter]
public Func<string, string> EnumFilterTranslationFunc { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<string, string> |
EnumNullFilterText
Gets or sets the nullable enum for null value filter text.
Declaration
[Parameter]
public string EnumNullFilterText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The enum filter select text. |
EqualsText
Gets or sets the equals text.
Declaration
[Parameter]
public string EqualsText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The equals text. |
ExpandChildItemAriaLabel
Gets or sets the expand child item aria label text.
Declaration
[Parameter]
public string ExpandChildItemAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The expand child item aria label text. |
ExpandGroupAriaLabel
Gets or sets the expand group aria label text.
Declaration
[Parameter]
public string ExpandGroupAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The expand group aria label text. |
ExpandMode
Gets or sets the expand mode.
Declaration
[Parameter]
public DataGridExpandMode ExpandMode { get; set; }
Property Value
| Type | Description |
|---|---|
| DataGridExpandMode | The expand mode. |
Filter
Gets or sets the column filter callback.
Declaration
[Parameter]
public EventCallback<DataGridColumnFilterEventArgs<TItem>> Filter { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridColumnFilterEventArgs<TItem>> | The column filter callback. |
FilterCaseSensitivity
Gets or sets the filter case sensitivity.
Declaration
[Parameter]
public FilterCaseSensitivity FilterCaseSensitivity { get; set; }
Property Value
| Type | Description |
|---|---|
| FilterCaseSensitivity | The filter case sensitivity. |
FilterCleared
Gets or sets the column filter cleared callback.
Declaration
[Parameter]
public EventCallback<DataGridColumnFilterEventArgs<TItem>> FilterCleared { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridColumnFilterEventArgs<TItem>> | The column filter callback. |
FilterDateFormat
Gets or sets the filter date format.
Declaration
[Parameter]
public string FilterDateFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The filter date format. |
FilterDelay
Gets or sets the filter delay.
Declaration
[Parameter]
public int FilterDelay { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The filter delay. |
FilterIcon
Gets or set the filter icon to use.
Declaration
[Parameter]
public string FilterIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
FilterMode
Gets or sets the filter mode.
Declaration
[Parameter]
public FilterMode FilterMode { get; set; }
Property Value
| Type | Description |
|---|---|
| FilterMode | The filter mode. |
FilterOperatorAriaLabel
Gets or sets the column filter value aria label text.
Declaration
[Parameter]
public string FilterOperatorAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The the column filter value aria label text. |
FilterPopupRenderMode
Gets or sets the render mode.
Declaration
[Parameter]
public PopupRenderMode FilterPopupRenderMode { get; set; }
Property Value
| Type | Description |
|---|---|
| PopupRenderMode | The render mode. |
FilterRowActive
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.
Declaration
public bool FilterRowActive { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
FilterText
Gets or sets the filter text.
Declaration
[Parameter]
public string FilterText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The filter text. |
FilterToggleAriaLabel
Gets or sets the date simple filter toggle aria label text.
Declaration
[Parameter]
public string FilterToggleAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The date simple filter toggle aria label text. |
FilterValueAriaLabel
Gets or sets the column filter value aria label text.
Declaration
[Parameter]
public string FilterValueAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The the column filter value aria label text. |
FooterCellRender
Gets or sets the footer cell render callback. Use it to set footer cell attributes.
Declaration
[Parameter]
public Action<DataGridCellRenderEventArgs<TItem>> FooterCellRender { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<DataGridCellRenderEventArgs<TItem>> | The cell render callback. |
FooterTemplate
Gives the grid a custom footer, allowing the adding of components to create custom tool bars or custom pagination
Declaration
[Parameter]
public RenderFragment FooterTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment |
GotoFirstPageOnSort
Gets or sets the ability to automatically goto the first page when sorting is changed.
Declaration
[Parameter]
public bool GotoFirstPageOnSort { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
GreaterThanOrEqualsText
Gets or sets the greater than or equals text.
Declaration
[Parameter]
public string GreaterThanOrEqualsText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The greater than or equals text. |
GreaterThanText
Gets or sets the greater than text.
Declaration
[Parameter]
public string GreaterThanText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The greater than text. |
GridLines
Gets or sets the grid lines.
Declaration
[Parameter]
public DataGridGridLines GridLines { get; set; }
Property Value
| Type | Description |
|---|---|
| DataGridGridLines | The grid lines. |
Group
Gets or sets the column group callback.
Declaration
[Parameter]
public EventCallback<DataGridColumnGroupEventArgs<TItem>> Group { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridColumnGroupEventArgs<TItem>> | The column group callback. |
GroupFootersAlwaysVisible
Gets or sets a value indicating whether group footers are visible even when the group is collapsed.
Declaration
[Parameter]
public bool GroupFootersAlwaysVisible { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
GroupHeaderTemplate
Gets or sets the group header template.
Declaration
[Parameter]
public RenderFragment<Group> GroupHeaderTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment<Group> | The group header template. |
GroupHeaderToggleTemplate
Gets or sets the group header with option to add custom toggle visibility button template.
Declaration
[Parameter]
public RenderFragment<(Group Group, RadzenDataGridGroupRow<TItem> GroupHeader)> GroupHeaderToggleTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment<(Group Group, RadzenDataGridGroupRow<TItem> GroupHeader)> | The group header template with option to add custom toggle visibility. |
GroupPanelText
Gets or sets the group panel text.
Declaration
[Parameter]
public string GroupPanelText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The group panel text. |
GroupRowCollapse
Gets or sets the group row collapse callback.
Declaration
[Parameter]
public EventCallback<Group> GroupRowCollapse { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<Group> | The group row collapse callback. |
GroupRowExpand
Gets or sets the group row expand callback.
Declaration
[Parameter]
public EventCallback<Group> GroupRowExpand { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<Group> | The group row expand callback. |
GroupRowRender
Gets or sets the group row render callback. Use it to set group row attributes.
Declaration
[Parameter]
public Action<GroupRowRenderEventArgs> GroupRowRender { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<GroupRowRenderEventArgs> | The group row render callback. |
GroupedPagedView
Gets the view grouped and paged.
Declaration
public IEnumerable<GroupResult> GroupedPagedView { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<GroupResult> | The grouped paged view. |
Groups
Gets or sets the group descriptors.
Declaration
public ObservableCollection<GroupDescriptor> Groups { get; set; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<GroupDescriptor> | The groups. |
HeaderCellRender
Gets or sets the header cell render callback. Use it to set header cell attributes.
Declaration
[Parameter]
public Action<DataGridCellRenderEventArgs<TItem>> HeaderCellRender { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<DataGridCellRenderEventArgs<TItem>> | The cell render callback. |
HeaderTemplate
Gives the grid a custom header, allowing the adding of components to create custom tool bars in addtion to column grouping and column picker
Declaration
[Parameter]
public RenderFragment HeaderTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment |
HideGroupedColumn
Gets or sets a value indicating whether grouped column should be hidden.
Declaration
[Parameter]
public bool HideGroupedColumn { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
InText
Gets or sets the in operator text.
Declaration
[Parameter]
public string InText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The in operator text. |
IsEmptyText
Gets or sets the is empty text.
Declaration
[Parameter]
public string IsEmptyText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The empty text. |
IsLoading
Gets or sets a value indicating whether this instance loading indicator is shown.
Declaration
[Parameter]
public bool IsLoading { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
IsNotEmptyText
Gets or sets the is not empty text.
Declaration
[Parameter]
public string IsNotEmptyText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The not empty text. |
IsNotNullText
Gets or sets the not null text.
Declaration
[Parameter]
public string IsNotNullText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The not null text. |
IsNullText
Gets or sets the is null text.
Declaration
[Parameter]
public string IsNullText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The null text. |
IsValid
Gets whether all inline edit validators in the DataGrid are currently valid. Use this property to check validation state before saving edited rows.
Declaration
public bool IsValid { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
KeyDown
Gets or sets key down callback.
Declaration
[Parameter]
public EventCallback<KeyboardEventArgs> KeyDown { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<KeyboardEventArgs> | The key down callback. |
KeyProperty
Gets or sets the key property.
Declaration
[Parameter]
public string KeyProperty { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The key property. |
LessThanOrEqualsText
Gets or sets the less than or equals text.
Declaration
[Parameter]
public string LessThanOrEqualsText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The less than or equals text. |
LessThanText
Gets or sets the less than text.
Declaration
[Parameter]
public string LessThanText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The less than text. |
LoadChildData
Gets or sets the load child data callback.
Declaration
[Parameter]
public EventCallback<DataGridLoadChildDataEventArgs<TItem>> LoadChildData { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridLoadChildDataEventArgs<TItem>> | The load child data callback. |
LoadColumnFilterData
Gets or sets the callback used to load column filter data for DataGrid FilterMode.CheckBoxList filter mode.
Declaration
[Parameter]
public EventCallback<DataGridLoadColumnFilterDataEventArgs<TItem>> LoadColumnFilterData { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridLoadColumnFilterDataEventArgs<TItem>> | The load filter data event callback. |
LoadSettings
Gets or sets the load settings callback.
Declaration
[Parameter]
public Action<DataGridLoadSettingsEventArgs> LoadSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<DataGridLoadSettingsEventArgs> | The load settings callback. |
LogicalFilterOperator
Gets or sets the logical filter operator.
Declaration
[Parameter]
public LogicalFilterOperator LogicalFilterOperator { get; set; }
Property Value
| Type | Description |
|---|---|
| LogicalFilterOperator | The logical filter operator. |
LogicalOperatorAriaLabel
Gets or sets the column logical filter value aria label text.
Declaration
[Parameter]
public string LogicalOperatorAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The the column logical filter value aria label text. |
NotEqualsText
Gets or sets the not equals text.
Declaration
[Parameter]
public string NotEqualsText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The not equals text. |
NotInText
Gets or sets the not in operator text.
Declaration
[Parameter]
public string NotInText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The not in operator text. |
OrOperatorText
Gets or sets the or operator text.
Declaration
[Parameter]
public string OrOperatorText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The or operator text. |
PageSizeChanged
Gets or sets the page size changed callback.
Declaration
[Parameter]
public EventCallback<int> PageSizeChanged { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<int> | The page size changed callback. |
PickedColumnsChanged
Gets or sets the picked columns changed callback.
Declaration
[Parameter]
public EventCallback<DataGridPickedColumnsChangedEventArgs<TItem>> PickedColumnsChanged { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridPickedColumnsChangedEventArgs<TItem>> | The picked columns changed callback. |
Query
Gets the query.
Declaration
public Query Query { get; }
Property Value
| Type | Description |
|---|---|
| Query | The query. |
RemoveGroupAriaLabel
Gets or sets the remove group button aria label text.
Declaration
[Parameter]
public string RemoveGroupAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The remove group button aria label text. |
Render
Gets or sets the render callback.
Declaration
[Parameter]
public Action<DataGridRenderEventArgs<TItem>> Render { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<DataGridRenderEventArgs<TItem>> | The render callback. |
RenderAsync
Gets or sets the render async callback.
Declaration
[Parameter]
public Func<DataGridRenderEventArgs<TItem>, Task> RenderAsync { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<DataGridRenderEventArgs<TItem>, Task> | The render async callback. |
Responsive
Gets or sets a value indicating whether DataGrid is responsive.
Declaration
[Parameter]
public bool Responsive { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
RowClick
Gets or sets the row click callback.
Declaration
[Parameter]
public EventCallback<DataGridRowMouseEventArgs<TItem>> RowClick { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridRowMouseEventArgs<TItem>> | The row click callback. |
RowCollapse
Gets or sets the row collapse callback.
Declaration
[Parameter]
public EventCallback<TItem> RowCollapse { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<TItem> | The row collapse callback. |
RowCreate
Gets or sets the row create callback.
Declaration
[Parameter]
public EventCallback<TItem> RowCreate { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<TItem> | The row create callback. |
RowDeselect
Gets or sets the row deselect callback.
Declaration
[Parameter]
public EventCallback<TItem> RowDeselect { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<TItem> | The row deselect callback. |
RowDoubleClick
Gets or sets the row double click callback.
Declaration
[Parameter]
public EventCallback<DataGridRowMouseEventArgs<TItem>> RowDoubleClick { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridRowMouseEventArgs<TItem>> | The row double click callback. |
RowEdit
Gets or sets the row edit callback.
Declaration
[Parameter]
public EventCallback<TItem> RowEdit { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<TItem> | The row edit callback. |
RowExpand
Gets or sets the row expand callback.
Declaration
[Parameter]
public EventCallback<TItem> RowExpand { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<TItem> | The row expand callback. |
RowRender
Gets or sets the row render callback. Use it to set row attributes.
Declaration
[Parameter]
public Action<RowRenderEventArgs<TItem>> RowRender { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<RowRenderEventArgs<TItem>> | The row render callback. |
RowSelect
Gets or sets the row select callback.
Declaration
[Parameter]
public EventCallback<TItem> RowSelect { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<TItem> | The row select callback. |
RowUpdate
Gets or sets the row update callback.
Declaration
[Parameter]
public EventCallback<TItem> RowUpdate { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<TItem> | The row update callback. |
SecondFilterOperatorAriaLabel
Gets or sets the column filter value aria label text.
Declaration
[Parameter]
public string SecondFilterOperatorAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The the column filter value aria label text. |
SecondFilterValueAriaLabel
Gets or sets the column filter value aria label text.
Declaration
[Parameter]
public string SecondFilterValueAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The the column filter value aria label text. |
SelectVisibleColumnsAriaLabel
Gets or sets the select visible columns aria label text.
Declaration
[Parameter]
public string SelectVisibleColumnsAriaLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The select visible columns aria label text. |
SelectionMode
Gets or sets the selection mode.
Declaration
[Parameter]
public DataGridSelectionMode SelectionMode { get; set; }
Property Value
| Type | Description |
|---|---|
| DataGridSelectionMode | The selection mode. |
Settings
Gets or sets DataGrid settings.
Declaration
[Parameter]
public DataGridSettings Settings { get; set; }
Property Value
| Type | Description |
|---|---|
| DataGridSettings |
SettingsChanged
Gets or sets the settings changed callback.
Declaration
[Parameter]
public EventCallback<DataGridSettings> SettingsChanged { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridSettings> | The settings callback. |
ShowCellDataAsTooltip
Gets or sets a value indicating whether cell data should be shown as tooltip.
Declaration
[Parameter]
public bool ShowCellDataAsTooltip { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
ShowColumnTitleAsTooltip
Gets or sets a value indicating whether column title should be shown as tooltip.
Declaration
[Parameter]
public bool ShowColumnTitleAsTooltip { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
ShowEmptyMessage
Gets or sets a value indicating whether DataGrid data body show empty message.
Declaration
[Parameter]
public bool ShowEmptyMessage { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
ShowExpandColumn
Gets or sets whether the expandable indicator column is visible.
Declaration
[Parameter]
public bool ShowExpandColumn { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | The expandable indicator column visibility. |
ShowGroupExpandColumn
Gets or sets a value indicating whether to show group visibility column
Declaration
[Parameter]
public bool ShowGroupExpandColumn { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
ShowHeader
Gets or sets value if headers are shown.
Declaration
[Parameter]
public bool ShowHeader { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | If headers are shown value. |
ShowMultiColumnSortingIndex
Gets or sets a value indicating whether multi column sorting index is shown.
Declaration
[Parameter]
public bool ShowMultiColumnSortingIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Sort
Gets or sets the column sort callback.
Declaration
[Parameter]
public EventCallback<DataGridColumnSortEventArgs<TItem>> Sort { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<DataGridColumnSortEventArgs<TItem>> | The column sort callback. |
Sorts
Gets or sets the sort descriptors.
Declaration
public ObservableCollection<SortDescriptor> Sorts { get; set; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<SortDescriptor> | The sort. |
StartsWithText
Gets or sets the starts with text.
Declaration
[Parameter]
public string StartsWithText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The starts with text. |
Value
Gets or sets the selected item.
Declaration
[Parameter]
public IList<TItem> Value { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<TItem> | The selected item. |
ValueChanged
Gets or sets the value changed callback.
Declaration
[Parameter]
public EventCallback<IList<TItem>> ValueChanged { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<IList<TItem>> | The value changed callback. |
View
Gets the view - Data with sorting, filtering and paging applied.
Declaration
public override IQueryable<TItem> View { get; }
Property Value
| Type | Description |
|---|---|
| IQueryable<TItem> | The view. |
Overrides
VirtualizationOverscanCount
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.
Declaration
[Parameter]
public int VirtualizationOverscanCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The number of extra rows to render outside the viewport. Default is 3 (determined by the Virtualize component). |
Virtualize
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.
Declaration
public Virtualize<TItem> Virtualize { get; }
Property Value
| Type | Description |
|---|---|
| Virtualize<TItem> | The Virtualize component reference, or null if virtualization is not active. |
Methods
AddContextMenu()
Adds context menu for this component.
Declaration
protected override Task AddContextMenu()
Returns
| Type | Description |
|---|---|
| Task |
Overrides
ApplyDateFilterByFilterOperator(RadzenDataGridColumn<TItem>, FilterOperator)
Applies the date filter by filter operator.
Declaration
protected void ApplyDateFilterByFilterOperator(RadzenDataGridColumn<TItem> column, FilterOperator filterOperator)
Parameters
| Type | Name | Description |
|---|---|---|
| RadzenDataGridColumn<TItem> | column | The column. |
| FilterOperator | filterOperator | The filter operator. |
ApplyFilter(RadzenDataGridColumn<TItem>, bool)
Apply filter to the specified column
Declaration
public Task ApplyFilter(RadzenDataGridColumn<TItem> column, bool closePopup = false)
Parameters
| Type | Name | Description |
|---|---|---|
| RadzenDataGridColumn<TItem> | column | |
| bool | closePopup |
Returns
| Type | Description |
|---|---|
| Task |
BuildRenderTree(RenderTreeBuilder)
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.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
CancelEditRow(TItem)
Cancels the edited row.
Declaration
public void CancelEditRow(TItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
CancelEditRows(IEnumerable<TItem>)
Cancels the edit of a range of rows.
Declaration
public void CancelEditRows(IEnumerable<TItem> items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TItem> | items | The range of rows. |
ClearFilter(RadzenDataGridColumn<TItem>, bool, bool)
Сlear filter on the specified column
Declaration
public Task ClearFilter(RadzenDataGridColumn<TItem> column, bool closePopup = false, bool shouldReload = true)
Parameters
| Type | Name | Description |
|---|---|---|
| RadzenDataGridColumn<TItem> | column | |
| bool | closePopup | |
| bool | shouldReload |
Returns
| Type | Description |
|---|---|
| Task |
CollapseAll()
Collapse all rows that are expanded
Declaration
public Task CollapseAll()
Returns
| Type | Description |
|---|---|
| Task |
CollapseRows(IEnumerable<TItem>)
Collapse a range of rows.
Declaration
public Task CollapseRows(IEnumerable<TItem> items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TItem> | items | The range of rows. |
Returns
| Type | Description |
|---|---|
| Task |
DateFilterOperatorStyle(RadzenDataGridColumn<TItem>, FilterOperator)
The filter operator style for dates.
Declaration
protected string DateFilterOperatorStyle(RadzenDataGridColumn<TItem> column, FilterOperator value)
Parameters
| Type | Name | Description |
|---|---|---|
| RadzenDataGridColumn<TItem> | column | The column. |
| FilterOperator | value | The value. |
Returns
| Type | Description |
|---|---|
| string | System.String. |
Dispose()
Detaches event handlers and disposes Reference.
Declaration
public override void Dispose()
Overrides
EditRow(TItem)
Edits the row.
Declaration
public Task EditRow(TItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
Returns
| Type | Description |
|---|---|
| Task |
EditRows(IEnumerable<TItem>)
Edits a range of rows.
Declaration
public Task EditRows(IEnumerable<TItem> items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TItem> | items | The range of rows. |
Returns
| Type | Description |
|---|---|
| Task |
ExpandGroupItem(RadzenDataGridGroupRow<TItem>, bool?)
Expand group item.
Declaration
public Task ExpandGroupItem(RadzenDataGridGroupRow<TItem> item, bool? expandedOnLoad)
Parameters
| Type | Name | Description |
|---|---|---|
| RadzenDataGridGroupRow<TItem> | item | |
| bool? | expandedOnLoad |
Returns
| Type | Description |
|---|---|
| Task |
ExpandRow(TItem)
Expands the row to show the content defined in Template property.
Declaration
public Task ExpandRow(TItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
Returns
| Type | Description |
|---|---|
| Task |
ExpandRows(IEnumerable<TItem>)
Expands a range of rows.
Declaration
public Task ExpandRows(IEnumerable<TItem> items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TItem> | items | The range of rows. |
Returns
| Type | Description |
|---|---|
| Task |
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
| Type | Description |
|---|---|
| string |
Overrides
InsertAfterRow(TItem, TItem)
Inserts new row after specific row item.
Declaration
public Task InsertAfterRow(TItem itemToInsert, TItem rowItem)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | itemToInsert | The item. |
| TItem | rowItem | Row item to insert after |
Returns
| Type | Description |
|---|---|
| Task |
InsertRow(TItem)
Inserts new row.
Declaration
public Task InsertRow(TItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
Returns
| Type | Description |
|---|---|
| Task |
IsRowExpanded(TItem)
Gets boolean value indicating if the row is expanded or not.
Declaration
public bool IsRowExpanded(TItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
Returns
| Type | Description |
|---|---|
| bool |
IsRowInEditMode(TItem)
Determines whether row in edit mode.
Declaration
public bool IsRowInEditMode(TItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
Returns
| Type | Description |
|---|---|
| bool |
|
ItemEquals(TItem, TItem)
Compares two items
Declaration
protected bool ItemEquals(TItem item, TItem otherItem)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The first item |
| TItem | otherItem | The second item |
Returns
| Type | Description |
|---|---|
| bool | Are items equal |
OnAfterRenderAsync(bool)
Called when [after render asynchronous].
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | firstRender | if set to |
Returns
| Type | Description |
|---|---|
| Task | Task. |
Overrides
OnCollectionChanged(object, NotifyCollectionChangedEventArgs)
Called when INotifyCollectionChanged CollectionChanged is raised.
Declaration
protected override void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | |
| NotifyCollectionChangedEventArgs | args |
Overrides
OnColumnResized(int, double)
Called when column is resized.
Declaration
[JSInvokable("RadzenGrid.OnColumnResized")]
public Task OnColumnResized(int columnIndex, double value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | columnIndex | Index of the column. |
| double | value | The value. |
Returns
| Type | Description |
|---|---|
| Task |
OnContextMenu(MouseEventArgs)
Raises ContextMenu.
Declaration
public override Task OnContextMenu(MouseEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | args | The MouseEventArgs instance containing the event data. |
Returns
| Type | Description |
|---|---|
| Task |
Overrides
OnDataChanged()
Called when data is changed.
Declaration
protected override void OnDataChanged()
Overrides
OnFilter(ChangeEventArgs, RadzenDataGridColumn<TItem>, bool, bool)
Called when filter.
Declaration
protected virtual Task OnFilter(ChangeEventArgs args, RadzenDataGridColumn<TItem> column, bool force = false, bool isFirst = true)
Parameters
| Type | Name | Description |
|---|---|---|
| ChangeEventArgs | args | The ChangeEventArgs instance containing the event data. |
| RadzenDataGridColumn<TItem> | column | The column. |
| bool | force | if set to |
| bool | isFirst | if set to |
Returns
| Type | Description |
|---|---|
| Task |
OnFilterKeyPress(EventArgs, RadzenDataGridColumn<TItem>)
Called when filter key pressed.
Declaration
protected virtual void OnFilterKeyPress(EventArgs args, RadzenDataGridColumn<TItem> column)
Parameters
| Type | Name | Description |
|---|---|---|
| EventArgs | args | The EventArgs instance containing the event data. |
| RadzenDataGridColumn<TItem> | column | The column. |
OnInitialized()
Called by the Blazor runtime.
Declaration
protected override void OnInitialized()
Overrides
OnKeyDown(KeyboardEventArgs)
Handles the KeyDown event.
Declaration
protected virtual Task OnKeyDown(KeyboardEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyboardEventArgs | args | The KeyboardEventArgs instance containing the event data. |
Returns
| Type | Description |
|---|---|
| Task |
OnPageSizeChanged(int)
Called when [page size changed].
Declaration
protected override Task OnPageSizeChanged(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The value. |
Returns
| Type | Description |
|---|---|
| Task |
Overrides
OnParametersSetAsync()
Called when parameters set asynchronous.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | Task. |
Overrides
OrderBy(string)
Orders the DataGrid by property name.
Declaration
public void OrderBy(string property)
Parameters
| Type | Name | Description |
|---|---|---|
| string | property | The property name. |
OrderByDescending(string)
Orders descending the DataGrid by property name.
Declaration
public void OrderByDescending(string property)
Parameters
| Type | Name | Description |
|---|---|---|
| string | property | The property name. |
RefreshDataAsync()
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.
Declaration
public Task RefreshDataAsync()
Returns
| Type | Description |
|---|---|
| Task | A task representing the asynchronous refresh operation. |
Reload()
Reloads this instance.
Declaration
public override Task Reload()
Returns
| Type | Description |
|---|---|
| Task |
Overrides
ReloadSettings(bool)
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.
Declaration
public Task ReloadSettings(bool forceReload = false)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | forceReload | If true, forces a reload of the settings regardless of their current state. Default is false. |
Returns
| Type | Description |
|---|---|
| Task |
Reset(bool, bool)
Resets the DataGrid instance to initial state with no sorting, grouping and/or filtering, column visibility.
Declaration
public void Reset(bool resetColumnState = true, bool resetRowState = false)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | resetColumnState | if set to |
| bool | resetRowState | if set to |
ResetLoadData()
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.
Declaration
public void ResetLoadData()
SaveSettings()
Saves DataGrid settings as JSON string.
Declaration
public void SaveSettings()
SelectRow(TItem, bool)
Selects the row.
Declaration
public Task SelectRow(TItem item, bool raiseEvent = true)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
| bool | raiseEvent | Should raise RowSelect event. |
Returns
| Type | Description |
|---|---|
| Task |
SetColumnFilterValueFromSettings(RadzenDataGridColumn<TItem>, DataGridColumnSettings, bool)
Override this method to customize how filter values are serialized back typed from the settings.
Declaration
public virtual bool SetColumnFilterValueFromSettings(RadzenDataGridColumn<TItem> gridColumn, DataGridColumnSettings columnSettings, bool isFirst)
Parameters
| Type | Name | Description |
|---|---|---|
| RadzenDataGridColumn<TItem> | gridColumn | Grid colum to set. |
| DataGridColumnSettings | columnSettings | Setting of the column. |
| bool | isFirst | Handle first or second filter value. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if state should update. |
SetParametersAsync(ParameterView)
Set parameters as an asynchronous operation.
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters | The parameters. |
Returns
| Type | Description |
|---|---|
| Task | A Task representing the asynchronous operation. |
Overrides
UpdatePickableColumns()
Updates pickable columns.
Declaration
public void UpdatePickableColumns()
UpdateRow(TItem)
Updates the row.
Declaration
public Task UpdateRow(TItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
Returns
| Type | Description |
|---|---|
| Task |