Class RadzenDropDownDataGrid<TValue>
RadzenDropDownDataGrid component.
public class RadzenDropDownDataGrid<TValue> : DropDownBase<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
Type Parameters
TValue
The type of the t value.
- Inheritance
-
DataBoundFormComponent<TValue>DropDownBase<TValue>RadzenDropDownDataGrid<TValue>
- Implements
- Inherited Members
Examples
<RadzenDropDownDataGrid @bind-Value=@customerID TValue="string" Data=@customers TextProperty="CompanyName" ValueProperty="CustomerID" Change=@(args => Console.WriteLine($"Selected CustomerID: {args}")) />
Constructors
RadzenDropDownDataGrid()
public RadzenDropDownDataGrid()
Fields
popup
Gets popup element reference.
protected ElementReference popup
Field Value
Properties
Add
Gets or sets the action to be executed when the Add button is clicked.
[Parameter]
public EventCallback<MouseEventArgs> Add { get; set; }
Property Value
AddAriaLabel
Gets or sets the add button aria-label attribute.
[Parameter]
public string AddAriaLabel { get; set; }
Property Value
AllowColumnResize
Gets or sets a value indicating whether column resizing is allowed.
[Parameter]
public bool AllowColumnResize { get; set; }
Property Value
- bool
true
if column resizing is allowed; otherwise,false
.
AllowFiltering
Gets or sets a value indicating whether filtering is allowed.
[Parameter]
public override bool AllowFiltering { get; set; }
Property Value
- bool
true
if filtering is allowed; otherwise,false
.
AllowFilteringByAllStringColumns
Gets or sets a value indicating whether filtering by all string columns is allowed.
[Parameter]
public bool AllowFilteringByAllStringColumns { get; set; }
Property Value
- bool
true
if filtering by all string columns is allowed; otherwise,false
.
AllowFilteringByWord
Gets or sets a value indicating whether filtering by each entered word in the search term, sperated by a space, is allowed.
[Parameter]
public bool AllowFilteringByWord { get; set; }
Property Value
- bool
true
if filtering by individual words is allowed; otherwise,false
.
AllowRowSelectOnRowClick
Gets or sets a value indicating whether DataGrid row can be selected on row click.
[Parameter]
public bool AllowRowSelectOnRowClick { get; set; }
Property Value
- bool
true
if DataGrid row can be selected on row click; otherwise,false
.
AllowSorting
Gets or sets a value indicating whether sorting is allowed.
[Parameter]
public bool AllowSorting { get; set; }
Property Value
- bool
true
if sorting is allowed; otherwise,false
.
CellRender
Gets or sets the cell render callback. Use it to set cell attributes.
[Parameter]
public Action<DataGridCellRenderEventArgs<object>> CellRender { get; set; }
Property Value
- Action<DataGridCellRenderEventArgs<object>>
The cell render callback.
Chips
Gets or sets a value indicating whether the selected items will be displayed as chips. Set to false
by default.
Requires Multiple to be set to true
.
[Parameter]
public bool Chips { get; set; }
Property Value
- bool
true
to display the selected items as chips; otherwise,false
.
ColumnWidth
Gets or sets the width of all columns.
[Parameter]
public string ColumnWidth { get; set; }
Property Value
- string
The width of all columns.
Columns
Gets or sets the columns.
[Parameter]
public RenderFragment Columns { get; set; }
Property Value
- RenderFragment
The columns.
DataGrid
Handles the reference to the DataGrid component.
public RadzenDataGrid<object> DataGrid { get; }
Property Value
Density
Gets or sets a value indicating DataGrid density.
[Parameter]
public Density Density { get; set; }
Property Value
EmptyTemplate
Gets or sets the empty template shown when Data is empty collection.
[Parameter]
public RenderFragment EmptyTemplate { get; set; }
Property Value
- RenderFragment
The empty template.
EmptyText
Gets or sets the empty text.
[Parameter]
public string EmptyText { get; set; }
Property Value
- string
The empty text.
FirstPageAriaLabel
Gets or sets the pager's first page button's aria-label attribute.
[Parameter]
public string FirstPageAriaLabel { get; set; }
Property Value
FirstPageTitle
Gets or sets the pager's first page button's title attribute.
[Parameter]
public string FirstPageTitle { get; set; }
Property Value
FocusFilterOnPopup
Gets or sets whether popup automatically focuses on filter input.
[Parameter]
public bool FocusFilterOnPopup { get; set; }
Property Value
- bool
true
if filter input should auto focus when opened; otherwise,false
.
InputAttributes
Specifies additional custom attributes that will be rendered by the input.
[Parameter]
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
Property Value
- IReadOnlyDictionary<string, object>
The attributes.
IsLoading
Gets or sets a value indicating whether this instance loading indicator is shown.
[Parameter]
public bool IsLoading { get; set; }
Property Value
- bool
true
if this instance loading indicator is shown; otherwise,false
.
Items
Gets the items.
protected override IEnumerable<object> Items { get; }
Property Value
- IEnumerable<object>
The items.
LastPageAriaLabel
Gets or sets the pager's last page button's aria-label attribute.
[Parameter]
public string LastPageAriaLabel { get; set; }
Property Value
LastPageTitle
Gets or sets the pager's last page button's title attribute.
[Parameter]
public string LastPageTitle { get; set; }
Property Value
MaxSelectedLabels
Gets or sets the number of maximum selected labels.
[Parameter]
public int MaxSelectedLabels { get; set; }
Property Value
- int
The maximum selected labels.
NextPageAriaLabel
Gets or sets the pager's next page button's aria-label attribute.
[Parameter]
public string NextPageAriaLabel { get; set; }
Property Value
NextPageTitle
Gets or sets the pager's next page button's title attribute.
[Parameter]
public string NextPageTitle { get; set; }
Property Value
OpenOnFocus
Gets or sets a value indicating whether popup should open on focus. Set to false
by default.
[Parameter]
public bool OpenOnFocus { get; set; }
Property Value
- bool
true
if popup should open on focus; otherwise,false
.
PageAriaLabelFormat
Gets or sets the pager's numeric page number buttons' aria-label attributes.
[Parameter]
public string PageAriaLabelFormat { get; set; }
Property Value
PageNumbersCount
Gets or sets the page numbers count.
[Parameter]
public int PageNumbersCount { get; set; }
Property Value
- int
The page numbers count.
PageTitleFormat
Gets or sets the pager's numeric page number buttons' title attributes.
[Parameter]
public string PageTitleFormat { get; set; }
Property Value
PagerAlwaysVisible
Gets or sets a value indicating whether pager is visible even when not enough data for paging.
[Parameter]
public bool PagerAlwaysVisible { get; set; }
Property Value
- bool
true
if pager is visible even when not enough data for paging otherwise,false
.
PagerHorizontalAlign
Gets or sets the horizontal align.
[Parameter]
public HorizontalAlign PagerHorizontalAlign { get; set; }
Property Value
- HorizontalAlign
The horizontal align.
PagingSummaryFormat
Gets or sets the pager summary format.
[Parameter]
public string PagingSummaryFormat { get; set; }
Property Value
- string
The pager summary format.
PrevPageAriaLabel
Gets or sets the pager's previous page button's aria-label attribute.
[Parameter]
public string PrevPageAriaLabel { get; set; }
Property Value
PrevPageTitle
Gets or sets the pager's previous page button's title attribute.
[Parameter]
public string PrevPageTitle { get; set; }
Property Value
Responsive
Gets or sets a value indicating whether this RadzenDropDownDataGrid<TValue> is responsive.
[Parameter]
public bool Responsive { get; set; }
Property Value
- bool
true
if responsive; otherwise,false
.
RowRender
Gets or sets the row render callback. Use it to set row attributes.
[Parameter]
public Action<RowRenderEventArgs<object>> RowRender { get; set; }
Property Value
- Action<RowRenderEventArgs<object>>
The row render callback.
SearchTextPlaceholder
Gets or sets the search input placeholder text.
[Parameter]
public string SearchTextPlaceholder { get; set; }
Property Value
- string
The search input placeholder text.
SelectedItemsText
Gets or sets the selected items text.
[Parameter]
public string SelectedItemsText { get; set; }
Property Value
- string
The selected items text.
SelectedValue
Gets or sets the selected value.
[Parameter]
public object SelectedValue { get; set; }
Property Value
- object
The selected value.
ShowAdd
Gets or sets a value indicating whether the create button is shown.
[Parameter]
public bool ShowAdd { get; set; }
Property Value
- bool
true
if the create button is shown; otherwise,false
.
ShowPagingSummary
Gets or sets the pager summary visibility.
[Parameter]
public bool ShowPagingSummary { get; set; }
Property Value
- bool
The pager summary visibility.
ShowSearch
Gets or sets a value indicating whether search button is shown.
[Parameter]
public bool ShowSearch { get; set; }
Property Value
- bool
true
if search button is shown; otherwise,false
.
ValueTemplate
Gets or sets the value template.
[Parameter]
public RenderFragment<dynamic> ValueTemplate { get; set; }
Property Value
- RenderFragment<dynamic>
The value template.
View
Gets the view. The data with sorting, filtering and paging applied.
public IEnumerable View { get; }
Property Value
- IEnumerable
The view.
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
Dispose()
public override void Dispose()
GetComponentCssClass()
protected override string GetComponentCssClass()
Returns
HandleKeyPress(KeyboardEventArgs, bool, bool?)
protected override Task HandleKeyPress(KeyboardEventArgs args, bool isFilter, bool? shouldSelectOnChange = null)
Parameters
args
KeyboardEventArgsisFilter
boolshouldSelectOnChange
bool?
Returns
OnAddClick(MouseEventArgs)
Handles the Click event.
public Task OnAddClick(MouseEventArgs args)
Parameters
args
MouseEventArgsThe MouseEventArgs instance containing the event data.
Returns
OnAfterRenderAsync(bool)
Called when [after render asynchronous].
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRender
boolif set to
true
[first render].
Returns
- Task
Task.
OnCellRender(DataGridCellRenderEventArgs<object>)
Executes CellRender callback.
protected virtual void OnCellRender(DataGridCellRenderEventArgs<object> args)
Parameters
OnDataChanged()
Called when data is changed.
protected override Task OnDataChanged()
Returns
OnFilter(ChangeEventArgs)
Handles the Filter event.
protected override Task OnFilter(ChangeEventArgs args)
Parameters
args
ChangeEventArgsThe ChangeEventArgs instance containing the event data.
Returns
OnRowRender(RowRenderEventArgs<object>)
Executes RowRender callback.
protected virtual void OnRowRender(RowRenderEventArgs<object> args)
Parameters
args
RowRenderEventArgs<object>
OpenPopup(string, bool, bool)
Opens the popup.
protected override Task OpenPopup(string key = "ArrowDown", bool isFilter = false, bool isFromClick = false)
Parameters
key
stringThe key.
isFilter
boolif set to
true
[is filter].isFromClick
boolif set to
true
[is from click].
Returns
Reload()
Reloads this instance.
public Task Reload()
Returns
Reset()
Resets component and deselects row
public Task Reset()
Returns
SelectItemFromValue(object)
Selects the item from value.
protected override void SelectItemFromValue(object value)
Parameters
value
objectThe value.
SetParametersAsync(ParameterView)
Set parameters as an asynchronous operation.
public override Task SetParametersAsync(ParameterView parameters)
Parameters
parameters
ParameterViewThe parameters.
Returns
- Task
A Task representing the asynchronous operation.