DataGrid<TRowData> Class

public class DataGrid<TRowData> : ComponentBase

Type parameters

TRowData

No documentation is available.

Inheritance
ComponentBase DataGrid<TRowData>

Constructors

NameDescription
DataGrid()

DataGrid()

DataGrid.razor
public DataGrid()

No documentation is available.

Properties

NameDescription
ChildContentGets or sets the child content, which should contain DataGridColumn<TRowData> components.
ItemsGets or sets the collection of items to display in the grid.
RowClassGets or sets a function to determine the CSS class for each row based on the row data and index.
RowKeyGets or sets a function that returns a stable, unique key for each row, used as the @key of the row element. Keys must be unique among the rendered rows; a duplicate key makes the renderer throw. When not specified, the row index is used, which is always unique.
TableAttributesGets or sets additional attributes to apply to the table element.

ChildContent

DataGrid.razor

Gets or sets the child content, which should contain DataGridColumn<TRowData> components.

public RenderFragment? ChildContent { get; set; }

Property value

RenderFragment?

Gets or sets the collection of items to display in the grid.

public IEnumerable<TRowData>? Items { get; set; }

Gets or sets a function to determine the CSS class for each row based on the row data and index.

public Func<TRowData, int, string>? RowClass { get; set; }

Gets or sets a function that returns a stable, unique key for each row, used as the @key of the row element. Keys must be unique among the rendered rows; a duplicate key makes the renderer throw. When not specified, the row index is used, which is always unique.

public Func<TRowData, object>? RowKey { get; set; }

TableAttributes

DataGrid.razor

Gets or sets additional attributes to apply to the table element.

public Dictionary<string, object>? TableAttributes { get; set; }

Methods

NameDescription
BuildRenderTree(RenderTreeBuilder)

BuildRenderTree(RenderTreeBuilder)

DataGrid.razor
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

No documentation is available.