Class RadzenDataGridColumn<TItem>
RadzenDataGridColumn component. Must be placed inside a RadzenDataGrid<TItem>
Inheritance
Implements
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenDataGridColumn<TItem> : ComponentBase, IDisposable
Type Parameters
Name | Description |
---|---|
TItem | The type of the DataGrid item. |
Properties
AllowCheckBoxListVirtualization
Specifies wether CheckBoxList filter list virtualization is enabled. Set to true
by default.
Declaration
public bool AllowCheckBoxListVirtualization { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
CalculatedCssClass
Gets or sets a function that calculates the CSS class based on the TItem
value.
Declaration
public Func<RadzenDataGridColumn<TItem>, TItem, string> CalculatedCssClass { get; set; }
Property Value
Type | Description |
---|---|
Func<RadzenDataGridColumn<TItem>, TItem, System.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
public string ColumnPickerTitle { get; set; }
Property Value
Type | Description |
---|---|
System.String | The column picker title. |
Columns
Gets or sets the columns.
Declaration
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
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The CSS class applied to data cells. |
CustomFilterExpression
Gets or sets the custom filter dynamic Linq dictionary.
Declaration
public string CustomFilterExpression { get; set; }
Property Value
Type | Description |
---|---|
System.String | The custom filter dynamic Linq dictionary. |
EditTemplate
Gets or sets the edit template.
Declaration
public RenderFragment<TItem> EditTemplate { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<TItem> | The edit template. |
Filterable
Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is filterable.
Declaration
public bool Filterable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
FilterMode
Gets or sets the column filter mode.
Declaration
public FilterMode? FilterMode { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<FilterMode> | The column filter mode. |
FilterOperator
Gets or sets the filter operator.
Declaration
public FilterOperator FilterOperator { get; set; }
Property Value
Type | Description |
---|---|
FilterOperator | The filter operator. |
FilterOperators
Gets or sets the filter operators.
Declaration
public IEnumerable<FilterOperator> FilterOperators { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<FilterOperator> | The filter operators. |
FilterPlaceholder
Gets or sets the filter placeholder.
Declaration
public string FilterPlaceholder { get; set; }
Property Value
Type | Description |
---|---|
System.String | The filter placeholder value. |
FilterProperty
Gets or sets the filter property name.
Declaration
public string FilterProperty { get; set; }
Property Value
Type | Description |
---|---|
System.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
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
public object FilterValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The filter value. |
FilterValueTemplate
Gets or sets the filter value template.
Declaration
public RenderFragment<RadzenDataGridColumn<TItem>> FilterValueTemplate { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<RadzenDataGridColumn<TItem>> | The filter value template. |
FooterCssClass
Gets or sets the footer CSS class applied to footer cell.
Declaration
public string FooterCssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The footer CSS class applied to footer cell. |
FooterTemplate
Gets or sets the footer template.
Declaration
public RenderFragment FooterTemplate { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment | The footer template. |
FormatProvider
Gets or sets the IFormatProvider used for FormatString.
Declaration
public IFormatProvider FormatProvider { get; set; }
Property Value
Type | Description |
---|---|
IFormatProvider | The IFormatProvider. |
FormatString
Gets or sets the format string.
Declaration
public string FormatString { get; set; }
Property Value
Type | Description |
---|---|
System.String | The format string. |
Frozen
Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is frozen.
Declaration
public bool Frozen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
FrozenPosition
Gets or sets the frozen position this RadzenDataGridColumn<TItem>
Declaration
public FrozenColumnPosition FrozenPosition { get; set; }
Property Value
Type | Description |
---|---|
FrozenColumnPosition |
Grid
Gets or sets the grid.
Declaration
public RadzenDataGrid<TItem> Grid { get; set; }
Property Value
Type | Description |
---|---|
RadzenDataGrid<TItem> | The grid. |
Groupable
Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is groupable.
Declaration
public bool Groupable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
GroupFooterCssClass
Gets or sets the group footer CSS class applied to group footer cell.
Declaration
public string GroupFooterCssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The group footer CSS class applied to group footer cell. |
GroupFooterTemplate
Gets or sets the group footer template.
Declaration
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
public string GroupProperty { get; set; }
Property Value
Type | Description |
---|---|
System.String | The group property name. |
HeaderCssClass
Gets or sets the header CSS class applied to header cell.
Declaration
public string HeaderCssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The header CSS class applied to header cell. |
HeaderTemplate
Gets or sets the header template.
Declaration
public RenderFragment HeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment | The header template. |
HeaderTooltip
Gets or sets the header tooltip.
Declaration
public string HeaderTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.String | The header tooltip. |
IsInEditMode
Allows the column to override whether or not this column's the EditTemplate is visible at runtime.
Declaration
public Func<string, TItem, bool> IsInEditMode { get; set; }
Property Value
Type | Description |
---|---|
Func<System.String, TItem, System.Boolean> |
LogicalFilterOperator
Gets or sets the logical filter operator.
Declaration
public LogicalFilterOperator LogicalFilterOperator { get; set; }
Property Value
Type | Description |
---|---|
LogicalFilterOperator | The logical filter operator. |
MinWidth
Gets or sets the min-width.
Declaration
public string MinWidth { get; set; }
Property Value
Type | Description |
---|---|
System.String | The min-width. |
OrderIndex
Gets or sets the order index.
Declaration
public int? OrderIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | The order index. |
Parent
Gets or sets the parent column.
Declaration
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
public bool Pickable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Property
Gets or sets the property name.
Declaration
public string Property { get; set; }
Property Value
Type | Description |
---|---|
System.String | The property name. |
Reorderable
Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is reorderable.
Declaration
public bool Reorderable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Resizable
Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is resizable.
Declaration
public bool Resizable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SecondFilterOperator
Gets or sets the second filter operator.
Declaration
public FilterOperator SecondFilterOperator { get; set; }
Property Value
Type | Description |
---|---|
FilterOperator | The second filter operator. |
SecondFilterValue
Gets or sets the second filter value.
Declaration
public object SecondFilterValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The second filter value. |
SecondFilterValueTemplate
Gets or sets the second filter value template.
Declaration
public RenderFragment<RadzenDataGridColumn<TItem>> SecondFilterValueTemplate { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<RadzenDataGridColumn<TItem>> | The second filter value template. |
Sortable
Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is sortable.
Declaration
public bool Sortable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SortOrder
Gets or sets the sort order.
Declaration
public SortOrder? SortOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<SortOrder> | The sort order. |
SortProperty
Gets or sets the sort property name.
Declaration
public string SortProperty { get; set; }
Property Value
Type | Description |
---|---|
System.String | The sort property name. |
Template
Gets or sets the template.
Declaration
public RenderFragment<TItem> Template { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<TItem> | The template. |
TextAlign
Gets or sets the text align.
Declaration
public TextAlign TextAlign { get; set; }
Property Value
Type | Description |
---|---|
TextAlign | The text align. |
Title
Gets or sets the title.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | The title. |
Type
Gets or sets the data type.
Declaration
public Type Type { get; set; }
Property Value
Type | Description |
---|---|
Type | The data type. |
UniqueID
Gets or sets the unique identifier.
Declaration
public string UniqueID { get; set; }
Property Value
Type | Description |
---|---|
System.String | The unique identifier. |
Visible
Gets or sets a value indicating whether this RadzenDataGridColumn<TItem> is visible.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Width
Gets or sets the width.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | The width. |
Methods
ClearFilters()
Sets to default column filter values and operators.
Declaration
public void ClearFilters()
CloseFilter()
Closes this column filter popup.
Declaration
public async Task CloseFilter()
Returns
Type | Description |
---|---|
Task |
Dispose()
Disposes this instance.
Declaration
public void Dispose()
GetColumnODataFilter(Boolean)
Gets an OData expression to filter by this column.
Declaration
public string GetColumnODataFilter(bool second = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | second | Whether to use SecondFilterValue instead of FilterValue |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.Object | filterValue | The specific value to filter by |
FilterOperator | filterOperator | The operator used to compare to |
Returns
Type | Description |
---|---|
System.String | An OData expression to filter by this column. |
GetCustomFilterExpression()
Get custom filter linq.
Declaration
public string GetCustomFilterExpression()
Returns
Type | Description |
---|---|
System.String |
GetFilterOperator()
Get column filter operator.
Declaration
public FilterOperator GetFilterOperator()
Returns
Type | Description |
---|---|
FilterOperator |
GetFilterOperators()
Get possible column filter operators.
Declaration
public virtual IEnumerable<FilterOperator> GetFilterOperators()
Returns
Type | Description |
---|---|
IEnumerable<FilterOperator> |
GetFilterOperatorText(FilterOperator)
Get filter operator text
Declaration
public string GetFilterOperatorText(FilterOperator filterOperator)
Parameters
Type | Name | Description |
---|---|---|
FilterOperator | filterOperator |
Returns
Type | Description |
---|---|
System.String |
GetFilterPlaceholder()
Gets the filter placeholder.
Declaration
public string GetFilterPlaceholder()
Returns
Type | Description |
---|---|
System.String | System.String. |
GetFilterProperty()
Gets the filter property.
Declaration
public string GetFilterProperty()
Returns
Type | Description |
---|---|
System.String | System.String. |
GetFilterValue()
Get column filter value.
Declaration
public object GetFilterValue()
Returns
Type | Description |
---|---|
System.Object |
GetGroupProperty()
Gets the group property.
Declaration
public string GetGroupProperty()
Returns
Type | Description |
---|---|
System.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 |
---|---|
System.Nullable<System.Int32> |
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 |
---|---|
System.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 |
---|---|
System.Nullable<System.Int32> |
GetSortOrder()
Get column sort order.
Declaration
public SortOrder? GetSortOrder()
Returns
Type | Description |
---|---|
System.Nullable<SortOrder> |
GetSortProperty()
Gets the sort property.
Declaration
public string GetSortProperty()
Returns
Type | Description |
---|---|
System.String | System.String. |
GetStyle(Boolean, Boolean, Boolean)
Gets the cell style.
Declaration
public virtual string GetStyle(bool forCell = false, bool isHeaderOrFooterCell = false, bool isForCol = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | forCell | if set to |
System.Boolean | isHeaderOrFooterCell | if set to |
System.Boolean | isForCol | if set to |
Returns
Type | Description |
---|---|
System.String | System.String. |
GetTitle()
Gets the column title.
Declaration
public string GetTitle()
Returns
Type | Description |
---|---|
System.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 |
---|---|
System.Object | System.Object. |
GetVisible()
Gets if the column is visible or not.
Declaration
public bool GetVisible()
Returns
Type | Description |
---|---|
System.Boolean | System.Boolean. |
GetWidth()
Get column width.
Declaration
public string GetWidth()
Returns
Type | Description |
---|---|
System.String |
OnInitialized()
Called when initialized.
Declaration
protected override void OnInitialized()
SetCustomFilterExpression(String)
Set column custom filter linq.
Declaration
public void SetCustomFilterExpression(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
SetCustomFilterExpressionAsync(String)
Set column custom filter linq and reload grid.
Declaration
public async Task SetCustomFilterExpressionAsync(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Filter value. |
Returns
Type | Description |
---|---|
Task |
SetFilterOperator(Nullable<FilterOperator>)
Set column filter operator.
Declaration
public void SetFilterOperator(FilterOperator? value)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<FilterOperator> | value |
SetFilterValue(Object, Boolean)
Set column filter value.
Declaration
public void SetFilterValue(object value, bool isFirst = true)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | |
System.Boolean | isFirst |
SetFilterValueAsync(Object, Boolean)
Set column filter value and reload grid.
Declaration
public async Task SetFilterValueAsync(object value, bool isFirst = true)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | Filter value. |
System.Boolean | isFirst |
|
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 async Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
SetSecondFilterOperator(Nullable<FilterOperator>)
Set column second filter operator.
Declaration
public void SetSecondFilterOperator(FilterOperator? value)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<FilterOperator> | value |
SetTitle(String)
Sets the column title.
Declaration
public void SetTitle(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
SetWidth(String)
Set column width.
Declaration
public void SetWidth(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
ShowTimeForDateTimeFilter()
Gets value indicating if the user can specify time in DateTime column filter.
Declaration
public virtual bool ShowTimeForDateTimeFilter()
Returns
Type | Description |
---|---|
System.Boolean |
ShowUpDownForNumericFilter()
Gets value indicating if up and down buttons are displayed in numeric column filter.
Declaration
public virtual bool ShowUpDownForNumericFilter()
Returns
Type | Description |
---|---|
System.Boolean |