Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenDataGridColumn<TItem>

    RadzenDataGridColumn component. Must be placed inside a RadzenDataGrid<TItem>

    Inheritance
    object
    ComponentBase
    RadzenDataGridColumn<TItem>
    RadzenDropDownDataGridColumn
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenDataGridColumn<TItem> : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Type Parameters
    Name Description
    TItem

    The type of the DataGrid item.

    Constructors

    RadzenDataGridColumn()

    RadzenDataGridColumn component. Must be placed inside a RadzenDataGrid<TItem>

    Declaration
    public RadzenDataGridColumn()

    Properties

    AllowCheckBoxListVirtualization

    Specifies wether CheckBoxList filter list virtualization is enabled. Set to true by default.

    Declaration
    [Parameter]
    public bool AllowCheckBoxListVirtualization { get; set; }
    Property Value
    Type Description
    bool

    CalculatedCssClass

    Gets or sets a function that calculates the CSS class based on the TItem value.

    Declaration
    [Parameter]
    public Func<RadzenDataGridColumn<TItem>, TItem, string> CalculatedCssClass { get; set; }
    Property Value
    Type Description
    Func<RadzenDataGridColumn<TItem>, TItem, string>

    The dynamic CSS class applied to data cells.

    ColumnPickerTitle

    Gets or sets the title in column picker. Value of Title is used when ColumnPickerTitle is not set

    Declaration
    [Parameter]
    public string ColumnPickerTitle { get; set; }
    Property Value
    Type Description
    string

    The column picker title.

    Columns

    Gets or sets the columns.

    Declaration
    [Parameter]
    public RenderFragment Columns { get; set; }
    Property Value
    Type Description
    RenderFragment

    The columns.

    ColumnsCollection

    Gets the child columns.

    Declaration
    public IList<RadzenDataGridColumn<TItem>> ColumnsCollection { get; }
    Property Value
    Type Description
    IList<RadzenDataGridColumn<TItem>>

    The child columns.

    CssClass

    Gets or sets the CSS class applied to data cells.

    Declaration
    [Parameter]
    public string CssClass { get; set; }
    Property Value
    Type Description
    string

    The CSS class applied to data cells.

    CustomFilterExpression

    Gets or sets the custom filter dynamic Linq dictionary.

    Declaration
    [Parameter]
    public string CustomFilterExpression { get; set; }
    Property Value
    Type Description
    string

    The custom filter dynamic Linq dictionary.

    EditTemplate

    Gets or sets the edit template.

    Declaration
    [Parameter]
    public RenderFragment<TItem> EditTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<TItem>

    The edit template.

    FilterMode

    Gets or sets the column filter mode.

    Declaration
    [Parameter]
    public FilterMode? FilterMode { get; set; }
    Property Value
    Type Description
    FilterMode?

    The column filter mode.

    FilterOperator

    Gets or sets the filter operator.

    Declaration
    [Parameter]
    public FilterOperator FilterOperator { get; set; }
    Property Value
    Type Description
    FilterOperator

    The filter operator.

    FilterOperators

    Gets or sets the filter operators.

    Declaration
    [Parameter]
    public IEnumerable<FilterOperator> FilterOperators { get; set; }
    Property Value
    Type Description
    IEnumerable<FilterOperator>

    The filter operators.

    FilterPlaceholder

    Gets or sets the filter placeholder.

    Declaration
    [Parameter]
    public string FilterPlaceholder { get; set; }
    Property Value
    Type Description
    string

    The filter placeholder value.

    FilterProperty

    Gets or sets the filter property name.

    Declaration
    [Parameter]
    public string FilterProperty { get; set; }
    Property Value
    Type Description
    string

    The filter property name.

    FilterPropertyType

    Gets the filter property type.

    Declaration
    public Type FilterPropertyType { get; }
    Property Value
    Type Description
    Type

    FilterTemplate

    Gets or sets the filter template.

    Declaration
    [Parameter]
    public RenderFragment<RadzenDataGridColumn<TItem>> FilterTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<RadzenDataGridColumn<TItem>>

    The filter template.

    FilterValue

    Gets or sets the filter value.

    Declaration
    [Parameter]
    public object FilterValue { get; set; }
    Property Value
    Type Description
    object

    The filter value.

    FilterValueTemplate

    Gets or sets the filter value template.

    Declaration
    [Parameter]
    public RenderFragment<RadzenDataGridColumn<TItem>> FilterValueTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<RadzenDataGridColumn<TItem>>

    The filter value template.

    Filterable

    Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is filterable.

    Declaration
    [Parameter]
    public bool Filterable { get; set; }
    Property Value
    Type Description
    bool

    true if filterable; otherwise, false.

    FooterCssClass

    Gets or sets the footer CSS class applied to footer cell.

    Declaration
    [Parameter]
    public string FooterCssClass { get; set; }
    Property Value
    Type Description
    string

    The footer CSS class applied to footer cell.

    FooterTemplate

    Gets or sets the footer template.

    Declaration
    [Parameter]
    public RenderFragment FooterTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment

    The footer template.

    FormatProvider

    Gets or sets the IFormatProvider used for FormatString.

    Declaration
    [Parameter]
    public IFormatProvider FormatProvider { get; set; }
    Property Value
    Type Description
    IFormatProvider

    The IFormatProvider.

    FormatString

    Gets or sets the format string.

    Declaration
    [Parameter]
    public string FormatString { get; set; }
    Property Value
    Type Description
    string

    The format string.

    Frozen

    Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is frozen.

    Declaration
    [Parameter]
    public bool Frozen { get; set; }
    Property Value
    Type Description
    bool

    true if frozen will disable horizontal scroll for the column; otherwise, false.

    FrozenPosition

    Gets or sets the frozen position this RadzenDataGridColumn<TItem>

    Declaration
    [Parameter]
    public FrozenColumnPosition FrozenPosition { get; set; }
    Property Value
    Type Description
    FrozenColumnPosition

    Left or Right.

    Grid

    Gets or sets the grid.

    Declaration
    [CascadingParameter]
    public RadzenDataGrid<TItem> Grid { get; set; }
    Property Value
    Type Description
    RadzenDataGrid<TItem>

    The grid.

    GroupFooterCssClass

    Gets or sets the group footer CSS class applied to group footer cell.

    Declaration
    [Parameter]
    public string GroupFooterCssClass { get; set; }
    Property Value
    Type Description
    string

    The group footer CSS class applied to group footer cell.

    GroupFooterTemplate

    Gets or sets the group footer template.

    Declaration
    [Parameter]
    public RenderFragment<Group> GroupFooterTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<Group>

    The group footer template.

    GroupProperty

    Gets or sets the group property name.

    Declaration
    [Parameter]
    public string GroupProperty { get; set; }
    Property Value
    Type Description
    string

    The group property name.

    Groupable

    Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is groupable.

    Declaration
    [Parameter]
    public bool Groupable { get; set; }
    Property Value
    Type Description
    bool

    true if groupable; otherwise, false.

    HeaderCssClass

    Gets or sets the header CSS class applied to header cell.

    Declaration
    [Parameter]
    public string HeaderCssClass { get; set; }
    Property Value
    Type Description
    string

    The header CSS class applied to header cell.

    HeaderTemplate

    Gets or sets the header template.

    Declaration
    [Parameter]
    public RenderFragment HeaderTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment

    The header template.

    HeaderTooltip

    Gets or sets the header tooltip.

    Declaration
    [Parameter]
    public string HeaderTooltip { get; set; }
    Property Value
    Type Description
    string

    The header tooltip.

    HeaderWhiteSpace

    Gets or sets the header white space style.

    Declaration
    [Parameter]
    public WhiteSpace HeaderWhiteSpace { get; set; }
    Property Value
    Type Description
    WhiteSpace

    IsInEditMode

    Allows the column to override whether or not this column's the EditTemplate is visible at runtime.

    Declaration
    [Parameter]
    public Func<string, TItem, bool> IsInEditMode { get; set; }
    Property Value
    Type Description
    Func<string, TItem, bool>

    LogicalFilterOperator

    Gets or sets the logical filter operator.

    Declaration
    [Parameter]
    public LogicalFilterOperator LogicalFilterOperator { get; set; }
    Property Value
    Type Description
    LogicalFilterOperator

    The logical filter operator.

    MaxWidth

    Gets or sets the max-width.

    Declaration
    [Parameter]
    public string MaxWidth { get; set; }
    Property Value
    Type Description
    string

    The max-width.

    MinWidth

    Gets or sets the min-width.

    Declaration
    [Parameter]
    public string MinWidth { get; set; }
    Property Value
    Type Description
    string

    The min-width.

    OrderIndex

    Gets or sets the order index.

    Declaration
    [Parameter]
    public int? OrderIndex { get; set; }
    Property Value
    Type Description
    int?

    The order index.

    Parent

    Gets or sets the parent column.

    Declaration
    [CascadingParameter]
    public RadzenDataGridColumn<TItem> Parent { get; set; }
    Property Value
    Type Description
    RadzenDataGridColumn<TItem>

    The parent column.

    Pickable

    Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is pickable - listed when DataGrid AllowColumnPicking is set to true.

    Declaration
    [Parameter]
    public bool Pickable { get; set; }
    Property Value
    Type Description
    bool

    true if pickable; otherwise, false.

    Property

    Gets or sets the property name.

    Declaration
    [Parameter]
    public string Property { get; set; }
    Property Value
    Type Description
    string

    The property name.

    Reorderable

    Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is reorderable.

    Declaration
    [Parameter]
    public bool Reorderable { get; set; }
    Property Value
    Type Description
    bool

    true if reorderable; otherwise, false.

    Resizable

    Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is resizable.

    Declaration
    [Parameter]
    public bool Resizable { get; set; }
    Property Value
    Type Description
    bool

    true if resizable; otherwise, false.

    SecondFilterOperator

    Gets or sets the second filter operator.

    Declaration
    [Parameter]
    public FilterOperator SecondFilterOperator { get; set; }
    Property Value
    Type Description
    FilterOperator

    The second filter operator.

    SecondFilterValue

    Gets or sets the second filter value.

    Declaration
    [Parameter]
    public object SecondFilterValue { get; set; }
    Property Value
    Type Description
    object

    The second filter value.

    SecondFilterValueTemplate

    Gets or sets the second filter value template.

    Declaration
    [Parameter]
    public RenderFragment<RadzenDataGridColumn<TItem>> SecondFilterValueTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<RadzenDataGridColumn<TItem>>

    The second filter value template.

    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

    true if cell data is shown as tooltip; otherwise, false.

    SortOrder

    Gets or sets the sort order.

    Declaration
    [Parameter]
    public SortOrder? SortOrder { get; set; }
    Property Value
    Type Description
    SortOrder?

    The sort order.

    SortProperty

    Gets or sets the sort property name.

    Declaration
    [Parameter]
    public string SortProperty { get; set; }
    Property Value
    Type Description
    string

    The sort property name.

    Sortable

    Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is sortable.

    Declaration
    [Parameter]
    public bool Sortable { get; set; }
    Property Value
    Type Description
    bool

    true if sortable; otherwise, false.

    Template

    Gets or sets the template.

    Declaration
    [Parameter]
    public RenderFragment<TItem> Template { get; set; }
    Property Value
    Type Description
    RenderFragment<TItem>

    The template.

    TextAlign

    Gets or sets the text align.

    Declaration
    [Parameter]
    public TextAlign TextAlign { get; set; }
    Property Value
    Type Description
    TextAlign

    The text align.

    Title

    Gets or sets the title.

    Declaration
    [Parameter]
    public string Title { get; set; }
    Property Value
    Type Description
    string

    The title.

    Type

    Gets or sets the data type.

    Declaration
    [Parameter]
    public Type Type { get; set; }
    Property Value
    Type Description
    Type

    The data type.

    UniqueID

    Gets or sets the unique identifier.

    Declaration
    [Parameter]
    public string UniqueID { get; set; }
    Property Value
    Type Description
    string

    The unique identifier.

    Visible

    Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is visible.

    Declaration
    [Parameter]
    public bool Visible { get; set; }
    Property Value
    Type Description
    bool

    true if visible; otherwise, false.

    WhiteSpace

    Gets or sets the white space style.

    Declaration
    [Parameter]
    public WhiteSpace WhiteSpace { get; set; }
    Property Value
    Type Description
    WhiteSpace

    Width

    Gets or sets the width.

    Declaration
    [Parameter]
    public string Width { get; set; }
    Property Value
    Type Description
    string

    The width.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    RadzenDataGridColumn component. Must be placed inside a RadzenDataGrid<TItem>

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    ClearFilters()

    Sets to default column filter values and operators.

    Declaration
    public void ClearFilters()

    CloseFilter()

    Closes this column filter popup.

    Declaration
    public Task CloseFilter()
    Returns
    Type Description
    Task

    Dispose()

    Disposes this instance.

    Declaration
    public void Dispose()

    GetColumnODataFilter(bool)

    Gets an OData expression to filter by this column.

    Declaration
    public string GetColumnODataFilter(bool second = false)
    Parameters
    Type Name Description
    bool second

    Whether to use SecondFilterValue instead of FilterValue

    Returns
    Type Description
    string

    An OData expression to filter by this column.

    GetColumnODataFilter(object, FilterOperator)

    Gets an OData expression to filter by this column.

    Declaration
    protected virtual string GetColumnODataFilter(object filterValue, FilterOperator filterOperator)
    Parameters
    Type Name Description
    object filterValue

    The specific value to filter by

    FilterOperator filterOperator

    The operator used to compare to filterValue

    Returns
    Type Description
    string

    An OData expression to filter by this column.

    GetCustomFilterExpression()

    Get custom filter linq.

    Declaration
    public string GetCustomFilterExpression()
    Returns
    Type Description
    string

    GetFilterOperator()

    Get column filter operator.

    Declaration
    public FilterOperator GetFilterOperator()
    Returns
    Type Description
    FilterOperator

    GetFilterOperatorText(FilterOperator)

    Get filter operator text

    Declaration
    public string GetFilterOperatorText(FilterOperator filterOperator)
    Parameters
    Type Name Description
    FilterOperator filterOperator
    Returns
    Type Description
    string

    GetFilterOperators()

    Get possible column filter operators.

    Declaration
    public virtual IEnumerable<FilterOperator> GetFilterOperators()
    Returns
    Type Description
    IEnumerable<FilterOperator>

    GetFilterPlaceholder()

    Gets the filter placeholder.

    Declaration
    public string GetFilterPlaceholder()
    Returns
    Type Description
    string

    System.String.

    GetFilterProperty()

    Gets the filter property.

    Declaration
    public string GetFilterProperty()
    Returns
    Type Description
    string

    System.String.

    GetFilterValue()

    Get column filter value.

    Declaration
    public object GetFilterValue()
    Returns
    Type Description
    object

    GetGroupProperty()

    Gets the group property.

    Declaration
    public string GetGroupProperty()
    Returns
    Type Description
    string

    System.String.

    GetLogicalFilterOperator()

    Get column logical filter operator.

    Declaration
    public LogicalFilterOperator GetLogicalFilterOperator()
    Returns
    Type Description
    LogicalFilterOperator

    GetOrderIndex()

    Gets the order index.

    Declaration
    public int? GetOrderIndex()
    Returns
    Type Description
    int?

    GetSecondFilterOperator()

    Get column second filter operator.

    Declaration
    public FilterOperator GetSecondFilterOperator()
    Returns
    Type Description
    FilterOperator

    GetSecondFilterValue()

    Get column second filter value.

    Declaration
    public object GetSecondFilterValue()
    Returns
    Type Description
    object

    GetSortIndex()

    Gets the column sort descriptor index indicating order of applied column sort in case of multiple sorting.

    Declaration
    public int? GetSortIndex()
    Returns
    Type Description
    int?

    GetSortOrder()

    Get column sort order.

    Declaration
    public SortOrder? GetSortOrder()
    Returns
    Type Description
    SortOrder?

    GetSortProperty()

    Gets the sort property.

    Declaration
    public string GetSortProperty()
    Returns
    Type Description
    string

    System.String.

    GetStyle(bool, bool, bool)

    Gets the cell style.

    Declaration
    public virtual string GetStyle(bool forCell = false, bool isHeaderOrFooterCell = false, bool isForCol = false)
    Parameters
    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].

    Returns
    Type Description
    string

    System.String.

    GetTitle()

    Gets the column title.

    Declaration
    public string GetTitle()
    Returns
    Type Description
    string

    System.String.

    GetValue(TItem)

    Gets the value for specified item.

    Declaration
    public virtual object GetValue(TItem item)
    Parameters
    Type Name Description
    TItem item

    The item.

    Returns
    Type Description
    object

    System.Object.

    GetVisible()

    Gets if the column is visible or not.

    Declaration
    public bool GetVisible()
    Returns
    Type Description
    bool

    System.Boolean.

    GetWidth()

    Get column width.

    Declaration
    public string GetWidth()
    Returns
    Type Description
    string

    OnInitialized()

    Called when initialized.

    Declaration
    protected override void OnInitialized()
    Overrides
    ComponentBase.OnInitialized()

    SetCustomFilterExpression(string)

    Set column custom filter linq.

    Declaration
    public void SetCustomFilterExpression(string value)
    Parameters
    Type Name Description
    string value

    SetCustomFilterExpressionAsync(string)

    Set column custom filter linq and reload grid.

    Declaration
    public Task SetCustomFilterExpressionAsync(string value)
    Parameters
    Type Name Description
    string value

    Filter value.

    Returns
    Type Description
    Task

    SetFilterOperator(FilterOperator?)

    Set column filter operator.

    Declaration
    public void SetFilterOperator(FilterOperator? value)
    Parameters
    Type Name Description
    FilterOperator? value

    SetFilterValue(object, bool)

    Set column filter value.

    Declaration
    public void SetFilterValue(object value, bool isFirst = true)
    Parameters
    Type Name Description
    object value
    bool isFirst

    SetFilterValueAsync(object, bool)

    Set column filter value and reload grid.

    Declaration
    public Task SetFilterValueAsync(object value, bool isFirst = true)
    Parameters
    Type Name Description
    object value

    Filter value.

    bool isFirst

    true if FilterValue; false for SecondFilterValue

    Returns
    Type Description
    Task

    SetLogicalFilterOperator(LogicalFilterOperator)

    Set column second logical operator.

    Declaration
    public void SetLogicalFilterOperator(LogicalFilterOperator value)
    Parameters
    Type Name Description
    LogicalFilterOperator value

    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
    ComponentBase.SetParametersAsync(ParameterView)

    SetSecondFilterOperator(FilterOperator?)

    Set column second filter operator.

    Declaration
    public void SetSecondFilterOperator(FilterOperator? value)
    Parameters
    Type Name Description
    FilterOperator? value

    SetTitle(string)

    Sets the column title.

    Declaration
    public void SetTitle(string value)
    Parameters
    Type Name Description
    string value

    SetWidth(string)

    Set column width.

    Declaration
    public void SetWidth(string value)
    Parameters
    Type Name Description
    string value

    ShowTimeForDateTimeFilter()

    Gets value indicating if the user can specify time in DateTime column filter.

    Declaration
    public virtual bool ShowTimeForDateTimeFilter()
    Returns
    Type Description
    bool

    ShowUpDownForNumericFilter()

    Gets value indicating if up and down buttons are displayed in numeric column filter.

    Declaration
    public virtual bool ShowUpDownForNumericFilter()
    Returns
    Type Description
    bool

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT