Defines a column in a RadzenDataGrid, specifying how data is displayed, sorted, filtered, and edited. RadzenDataGridColumn supports data binding via Property, custom templates, formatting, sorting, filtering, grouping, aggregation, and inline editing. Must be placed inside a RadzenDataGrid<T> within the Columns template. Each column represents one field or computed value from the data source. Features data binding using Property to bind to a data field or Template for custom content, display properties (Title, FormatString, TextAlign, Width, Frozen for locked scrolling), Sortable property enabling/disabling sorting, Filterable property with FilterTemplate for custom filter UI and FilterValue for programmatic filtering, EditTemplate for inline editing with Editable property to control edit permission, GroupProperty for hierarchical data grouping, FooterTemplate with Sum()/Average()/Count() aggregation functions, child columns for multi-level headers, and Visible property with responsive breakpoint properties (visible-sm, visible-md, etc.). Use Template for complete control over cell rendering, or EditTemplate for edit mode cells.
Object
ComponentBase
IComponent
IHandleEvent
IHandleAfterRender
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.OnAfterRenderAsync
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenDataGridColumn<TItem> : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender| Name | Description |
|---|---|
| TItem | The type of data items in the parent DataGrid. Must match the grid's TItem type. |
Simple data-bound column:
<RadzenDataGridColumn TItem="Order" Property="OrderId" Title="Order ID" />
Formatted column with custom width:
<RadzenDataGridColumn TItem="Order" Property="OrderDate" Title="Date" FormatString="{0:d}" Width="120px" />
Column with custom template:
<RadzenDataGridColumn TItem="Order" Title="Actions" Sortable="false" Filterable="false">
<Template Context="order">
<RadzenButton Icon="edit" Click="@(args => EditOrder(order))" />
<RadzenButton Icon="delete" Click="@(args => DeleteOrder(order))" />
</Template>
</RadzenDataGridColumn>Defines a column in a RadzenDataGrid, specifying how data is displayed, sorted, filtered, and edited. RadzenDataGridColumn supports data binding via Property, custom templates, formatting, sorting, filtering, grouping, aggregation, and inline editing. Must be placed inside a RadzenDataGrid<T> within the Columns template. Each column represents one field or computed value from the data source. Features data binding using Property to bind to a data field or Template for custom content, display properties (Title, FormatString, TextAlign, Width, Frozen for locked scrolling), Sortable property enabling/disabling sorting, Filterable property with FilterTemplate for custom filter UI and FilterValue for programmatic filtering, EditTemplate for inline editing with Editable property to control edit permission, GroupProperty for hierarchical data grouping, FooterTemplate with Sum()/Average()/Count() aggregation functions, child columns for multi-level headers, and Visible property with responsive breakpoint properties (visible-sm, visible-md, etc.). Use Template for complete control over cell rendering, or EditTemplate for edit mode cells.
public RadzenDataGridColumn<TItem>()Gets or sets whether virtualization is enabled for the CheckBoxList filter dropdown. When enabled, only visible checkbox items are rendered for better performance with large datasets. Only applicable when using FilterMode.CheckBoxList.
public bool AllowCheckBoxListVirtualization { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets whether virtualization is enabled for the CheckBoxList filter dropdown. When enabled, only visible checkbox items are rendered for better performance with large datasets. Only applicable when using FilterMode.CheckBoxList. |
Gets or sets whether the CheckBoxList filter should display all distinct values regardless of filters applied to other columns. When false (default), the filter list is dynamically filtered based on other active column filters. Set to true to always show the complete list of distinct values from the original dataset.
public bool AlwaysShowAllCheckBoxListData { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets whether the CheckBoxList filter should display all distinct values regardless of filters applied to other columns. When false (default), the filter list is dynamically filtered based on other active column filters. Set to true to always show the complete list of distinct values from the original dataset. |
Gets or sets a function that calculates the CSS class based on the TItem value.
public Func<RadzenDataGridColumn<TItem>, TItem, string> CalculatedCssClass { get; set; }
| Type | Description |
|---|---|
| Func<RadzenDataGridColumn<TItem>, TItem, string> | Gets or sets a function that calculates the CSS class based on the TItem value. |
Gets or sets the mode that determines whether the filter applies to any or all items in a collection.
public CollectionFilterMode CollectionFilterMode { get; set; }
| Type | Description |
|---|---|
| CollectionFilterMode | Gets or sets the mode that determines whether the filter applies to any or all items in a collection. |
Gets or sets the title in column picker. Value of Title is used when ColumnPickerTitle is not set
public string ColumnPickerTitle { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the title in column picker. Value of Title is used when ColumnPickerTitle is not set |
Gets or sets the child columns render fragment for creating composite/hierarchical column headers. When set, this column becomes a header grouping column, and child columns are rendered beneath it. Useful for creating multi-level column headers where related columns are grouped under a common header.
public RenderFragment Columns { get; set; }
| Type | Description |
|---|---|
| RenderFragment | Gets or sets the child columns render fragment for creating composite/hierarchical column headers. When set, this column becomes a header grouping column, and child columns are rendered beneath it. Useful for creating multi-level column headers where related columns are grouped under a common header. |
Gets the child columns.
public IList<RadzenDataGridColumn<TItem>> ColumnsCollection { get; }
| Type | Description |
|---|---|
| IList<RadzenDataGridColumn<TItem>> | Gets the child columns. |
Gets or sets the CSS class applied to data cells.
public string CssClass { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the CSS class applied to data cells. |
Gets or sets the custom filter dynamic Linq dictionary.
public string CustomFilterExpression { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the custom filter dynamic Linq dictionary. |
Gets or sets the edit template.
public RenderFragment<TItem> EditTemplate { get; set; }
| Type | Description |
|---|---|
| RenderFragment<TItem> | Gets or sets the edit template. |
Gets or sets the filtering UI mode for this column. Controls whether the column uses simple filter controls (textbox in header), advanced filter menu, CheckBoxList, or no filtering. If not set, inherits from the parent grid's FilterMode setting.
public FilterMode? FilterMode { get; set; }
| Type | Description |
|---|---|
| FilterMode? | Gets or sets the filtering UI mode for this column. Controls whether the column uses simple filter controls (textbox in header), advanced filter menu, CheckBoxList, or no filtering. If not set, inherits from the parent grid's FilterMode setting. |
Gets or sets the filter operator.
public FilterOperator FilterOperator { get; set; }
| Type | Description |
|---|---|
| FilterOperator | Gets or sets the filter operator. |
Gets or sets the filter operators.
public IEnumerable<FilterOperator> FilterOperators { get; set; }
| Type | Description |
|---|---|
| IEnumerable<FilterOperator> | Gets or sets the filter operators. |
Gets or sets the filter placeholder.
public string FilterPlaceholder { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the filter placeholder. |
Gets or sets the filter property name.
public string FilterProperty { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the filter property name. |
Gets the filter property type.
public Type FilterPropertyType { get; }
| Type | Description |
|---|---|
| Type | Gets the filter property type. |
Gets or sets the filter template.
public RenderFragment<RadzenDataGridColumn<TItem>> FilterTemplate { get; set; }
| Type | Description |
|---|---|
| RenderFragment<RadzenDataGridColumn<TItem>> | Gets or sets the filter template. |
Gets or sets the filter value.
public object FilterValue { get; set; }
| Type | Description |
|---|---|
| object | Gets or sets the filter value. |
Gets or sets the filter value template.
public RenderFragment<RadzenDataGridColumn<TItem>> FilterValueTemplate { get; set; }
| Type | Description |
|---|---|
| RenderFragment<RadzenDataGridColumn<TItem>> | Gets or sets the filter value template. |
Gets or sets a value indicating whether this RadzenDataGridColumn<T> is filterable.
public bool Filterable { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenDataGridColumn<T> is filterable. |
Gets or sets the IFormatProvider used for FormatString.
public IFormatProvider FormatProvider { get; set; }
| Type | Description |
|---|---|
| IFormatProvider | Gets or sets the IFormatProvider used for FormatString. |
Gets or sets the format string.
public string FormatString { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the format string. |
Gets or sets a value indicating whether this RadzenDataGridColumn<T> is frozen.
public bool Frozen { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenDataGridColumn<T> is frozen. |
Gets or sets the frozen position this RadzenDataGridColumn<T>
public FrozenColumnPosition FrozenPosition { get; set; }
| Type | Description |
|---|---|
| FrozenColumnPosition | Gets or sets the frozen position this RadzenDataGridColumn<T> |
Gets or sets the parent RadzenDataGrid that contains this column. This is set automatically via cascading parameter and provides access to grid functionality.
public RadzenDataGrid<TItem> Grid { get; set; }
| Type | Description |
|---|---|
| RadzenDataGrid<TItem> | Gets or sets the parent RadzenDataGrid that contains this column. This is set automatically via cascading parameter and provides access to grid functionality. |
Gets or sets the group property name.
public string GroupProperty { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the group property name. |
Gets or sets a value indicating whether this RadzenDataGridColumn<T> is groupable.
public bool Groupable { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenDataGridColumn<T> is groupable. |
Gets or sets the header CSS class applied to header cell.
public string HeaderCssClass { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the header CSS class applied to header cell. |
Gets or sets the header template.
public RenderFragment HeaderTemplate { get; set; }
| Type | Description |
|---|---|
| RenderFragment | Gets or sets the header template. |
Gets or sets the header tooltip.
public string HeaderTooltip { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the header tooltip. |
Gets or sets the header white space style.
public WhiteSpace HeaderWhiteSpace { get; set; }
| Type | Description |
|---|---|
| WhiteSpace | Gets or sets the header white space style. |
Allows the column to override whether or not this column's the EditTemplate is visible at runtime.
public Func<string, TItem, bool> IsInEditMode { get; set; }
| Type | Description |
|---|---|
| Func<string, TItem, bool> | Allows the column to override whether or not this column's the EditTemplate is visible at runtime. |
Gets or sets the logical filter operator.
public LogicalFilterOperator LogicalFilterOperator { get; set; }
| Type | Description |
|---|---|
| LogicalFilterOperator | Gets or sets the logical filter operator. |
Gets or sets the max-width.
public string MaxWidth { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the max-width. |
Gets or sets the min-width.
public string MinWidth { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the min-width. |
Gets or sets the order index.
public int? OrderIndex { get; set; }
| Type | Description |
|---|---|
| int? | Gets or sets the order index. |
Gets or sets the parent column when this column is nested within a composite column structure. This is set automatically via cascading parameter for child columns in hierarchical headers.
public RadzenDataGridColumn<TItem> Parent { get; set; }
| Type | Description |
|---|---|
| RadzenDataGridColumn<TItem> | Gets or sets the parent column when this column is nested within a composite column structure. This is set automatically via cascading parameter for child columns in hierarchical headers. |
Gets or sets a value indicating whether this RadzenDataGridColumn<T> is pickable - listed when DataGrid AllowColumnPicking is set to true.
public bool Pickable { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenDataGridColumn<T> is pickable - listed when DataGrid AllowColumnPicking is set to true. |
Gets or sets the property name.
public string Property { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the property name. |
Gets or sets a value indicating whether this RadzenDataGridColumn<T> is reorderable.
public bool Reorderable { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenDataGridColumn<T> is reorderable. |
Gets or sets a value indicating whether this RadzenDataGridColumn<T> is resizable.
public bool Resizable { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenDataGridColumn<T> is resizable. |
Gets or sets the second filter operator.
public FilterOperator SecondFilterOperator { get; set; }
| Type | Description |
|---|---|
| FilterOperator | Gets or sets the second filter operator. |
Gets or sets the second filter value.
public object SecondFilterValue { get; set; }
| Type | Description |
|---|---|
| object | Gets or sets the second filter value. |
Gets or sets the second filter value template.
public RenderFragment<RadzenDataGridColumn<TItem>> SecondFilterValueTemplate { get; set; }
| Type | Description |
|---|---|
| RenderFragment<RadzenDataGridColumn<TItem>> | Gets or sets the second filter value template. |
Gets or sets whether cell values should automatically display as tooltips on hover. Useful for columns that may contain truncated text, allowing users to see the full value.
public bool ShowCellDataAsTooltip { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets whether cell values should automatically display as tooltips on hover. Useful for columns that may contain truncated text, allowing users to see the full value. |
Gets or sets the sort order.
public SortOrder? SortOrder { get; set; }
| Type | Description |
|---|---|
| SortOrder? | Gets or sets the sort order. |
Gets or sets the sequence of the SortOrders to use when sorting the column interactively.
public Nullable`1[[Radzen.SortOrder, Blazor, Version=10.0.1.0, Culture=neutral, PublicKeyToken=null]][] SortOrderSequence { get; set; }
| Type | Description |
|---|---|
| Nullable`1[[Radzen.SortOrder, Radzen.Blazor, Version=10.0.1.0, Culture=neutral, PublicKeyToken=null]][] | Gets or sets the sequence of the SortOrders to use when sorting the column interactively. |
Gets or sets the sort property name.
public string SortProperty { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the sort property name. |
Gets or sets a value indicating whether this RadzenDataGridColumn<T> is sortable.
public bool Sortable { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenDataGridColumn<T> is sortable. |
Gets or sets the template.
public RenderFragment<TItem> Template { get; set; }
| Type | Description |
|---|---|
| RenderFragment<TItem> | Gets or sets the template. |
Gets or sets the text align.
public TextAlign TextAlign { get; set; }
| Type | Description |
|---|---|
| TextAlign | Gets or sets the text align. |
Gets or sets the title.
public string Title { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the title. |
Gets or sets the data type.
public Type Type { get; set; }
| Type | Description |
|---|---|
| Type | Gets or sets the data type. |
Gets or sets the unique identifier.
public string UniqueID { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the unique identifier. |
Indicates whether the column should automatically use the Name of the bound property as the header.
public bool UseDisplayName { get; set; }
| Type | Description |
|---|---|
| bool | Indicates whether the column should automatically use the Name of the bound property as the header. |
Gets or sets a value indicating whether this RadzenDataGridColumn<T> is visible.
public bool Visible { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenDataGridColumn<T> is visible. |
Gets or sets the white space style.
public WhiteSpace WhiteSpace { get; set; }
| Type | Description |
|---|---|
| WhiteSpace | Gets or sets the white space style. |
Gets or sets the width.
public string Width { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the width. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
Sets to default column filter values and operators.
public virtual void ClearFilters()Closes this column filter popup.
public Task CloseFilter()
| Type | Description |
|---|---|
| Task |
Get column collection filter mode.
public CollectionFilterMode GetCollectionFilterMode()
| Type | Description |
|---|---|
| CollectionFilterMode |
Gets an OData expression to filter by this column.
public string GetColumnODataFilter(bool second)
| Type | Name | Description |
|---|---|---|
| bool | second | Whether to use SecondFilterValue instead of FilterValue |
| Type | Description |
|---|---|
| string | An OData expression to filter by this column. |
Gets an OData expression to filter by this column.
protected virtual string GetColumnODataFilter(object filterValue, FilterOperator filterOperator)
| Type | Name | Description |
|---|---|---|
| object | filterValue | |
| FilterOperator | filterOperator |
| Type | Description |
|---|---|
| string | An OData expression to filter by this column. |
Get custom filter linq.
public string GetCustomFilterExpression()
| Type | Description |
|---|---|
| string |
Get column filter operator.
public FilterOperator GetFilterOperator()
| Type | Description |
|---|---|
| FilterOperator |
Get filter operator text
public string GetFilterOperatorText(FilterOperator filterOperator)
| Type | Name | Description |
|---|---|---|
| FilterOperator | filterOperator |
| Type | Description |
|---|---|
| string |
Get possible column filter operators.
public virtual IEnumerable<FilterOperator> GetFilterOperators()
| Type | Description |
|---|---|
| IEnumerable<FilterOperator> |
Gets the filter placeholder.
public string GetFilterPlaceholder()
| Type | Description |
|---|---|
| string | System.String. |
Gets the filter property.
public string GetFilterProperty()
| Type | Description |
|---|---|
| string | System.String. |
Get column filter value.
public object GetFilterValue()
| Type | Description |
|---|---|
| object |
Gets the group property.
public string GetGroupProperty()
| Type | Description |
|---|---|
| string | System.String. |
Get column logical filter operator.
public LogicalFilterOperator GetLogicalFilterOperator()
| Type | Description |
|---|---|
| LogicalFilterOperator |
Gets the order index.
public int? GetOrderIndex()
| Type | Description |
|---|---|
| int? |
Get column second filter operator.
public FilterOperator GetSecondFilterOperator()
| Type | Description |
|---|---|
| FilterOperator |
Get column second filter value.
public object GetSecondFilterValue()
| Type | Description |
|---|---|
| object |
Gets the column sort descriptor index indicating order of applied column sort in case of multiple sorting.
public int? GetSortIndex()
| Type | Description |
|---|---|
| int? |
Get column sort order.
public SortOrder? GetSortOrder()
| Type | Description |
|---|---|
| SortOrder? |
Gets the sort property.
public string GetSortProperty()
| Type | Description |
|---|---|
| string | System.String. |
Gets the cell style.
public virtual string GetStyle(bool forCell, bool isHeaderOrFooterCell, bool isForCol)
| Type | Name | Description |
|---|---|---|
| bool | forCell | if set to true [for cell]. |
| bool | isHeaderOrFooterCell | if set to true [is header or footer cell]. |
| bool | isForCol | if set to true [is for col element]. |
| Type | Description |
|---|---|
| string | System.String. |
Gets the column title.
public string GetTitle()
| Type | Description |
|---|---|
| string | System.String. |
Gets the value for specified item.
public virtual object GetValue(TItem item)
| Type | Name | Description |
|---|---|---|
| TItem | item | The item. |
| Type | Description |
|---|---|
| object | System.Object. |
Gets if the column is visible or not.
public bool GetVisible()
| Type | Description |
|---|---|
| bool | System.Boolean. |
Set column collection filter mode.
public void SetCollectionFilterMode(CollectionFilterMode? value)
| Type | Name | Description |
|---|---|---|
| CollectionFilterMode? | value |
Set column custom filter linq.
public void SetCustomFilterExpression(string value)
| Type | Name | Description |
|---|---|---|
| string | value |
Set column custom filter linq and reload grid.
public Task SetCustomFilterExpressionAsync(string value)
| Type | Name | Description |
|---|---|---|
| string | value | Filter value. |
| Type | Description |
|---|---|
| Task |
Set column filter operator.
public void SetFilterOperator(FilterOperator? value)
| Type | Name | Description |
|---|---|---|
| FilterOperator? | value |
Set column filter value.
public void SetFilterValue(object value, bool isFirst)
| Type | Name | Description |
|---|---|---|
| object | value | |
| bool | isFirst |
Set column filter value and reload grid.
public Task SetFilterValueAsync(object value, bool isFirst)
| Type | Name | Description |
|---|---|---|
| object | value | Filter value. |
| bool | isFirst | true if FilterValue; false for SecondFilterValue |
| Type | Description |
|---|---|
| Task |
Set column logical operator.
public void SetLogicalFilterOperator(LogicalFilterOperator value)
| Type | Name | Description |
|---|---|---|
| LogicalFilterOperator | value |
Set parameters as an asynchronous operation.
public override Task SetParametersAsync(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters | The parameters. |
| Type | Description |
|---|---|
| Task | A Task representing the asynchronous operation. |
Set column second filter operator.
public void SetSecondFilterOperator(FilterOperator? value)
| Type | Name | Description |
|---|---|---|
| FilterOperator? | value |
Sets the column title.
public void SetTitle(string value)
| Type | Name | Description |
|---|---|---|
| string | value |
Set column width.
public void SetWidth(string value)
| Type | Name | Description |
|---|---|---|
| string | value |
Gets value indicating if the user can specify time in DateTime column filter.
public virtual bool ShowTimeForDateTimeFilter()
| Type | Description |
|---|---|
| bool |
Gets value indicating if up and down buttons are displayed in numeric column filter.
public virtual bool ShowUpDownForNumericFilter()
| Type | Description |
|---|---|
| bool |