New to Telerik UI for BlazorStart a free 30-day trial

Definition

Namespace:Telerik.Blazor.Components.Common

Assembly:Telerik.Blazor.dll

Type Parameters:

TItem

TCommandEventArgs

Syntax:

C#
public abstract class TableGridBase<TItem, TCommandEventArgs> : GridBase<TItem>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable where TCommandEventArgs : TableGridBaseCommandEventArgs, new()

Inheritance: objectComponentBaseBaseComponentDataBoundComponent<TItem>GridBase<TItem>TableGridBase<TItem, TCommandEventArgs>...

Derived Classes: TelerikGrid<TItem>TelerikTreeList<TItem>

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members GridBase<TItem>.WidthGridBase<TItem>.HeightGridBase<TItem>.PageSizeChangedGridBase<TItem>.PageSizeGridBase<TItem>.PageGridBase<TItem>.PageChangedGridBase<TItem>.PageableGridBase<TItem>.OnModelInitGridBase<TItem>.TotalCountDataBoundComponent<TItem>.SetParametersAsync(ParameterView)DataBoundComponent<TItem>.OnParametersSetAsync()DataBoundComponent<TItem>.Rebind()DataBoundComponent<TItem>.DataBaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.BuildRenderTree(RenderTreeBuilder)ComponentBase.OnInitialized()ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)...

Constructors

C#
protected TableGridBase()

Fields

C#
protected HashSet<TItem> _selectedItemsMap

Methods

C#
public override void Dispose()

Overrides: DataBoundComponent<TItem>.Dispose()

C#
protected abstract TItem GetItemFromDropIndex(int index)
Parameters:indexintReturns:

TItem

Gets the data item instance at the specified index position.

C#
public TItem GetItemFromDropIndex(string index)
Parameters:indexstring

The index position within the currently rendered data rows.

Returns:

TItem

An object of type TItem.

C#
protected Task HandleVirtualScrollPaging()
Returns:

Task

C#
protected override void OnAfterRender(bool firstRender)
Parameters:firstRenderbool

Overrides: ComponentBase.OnAfterRender(bool)

C#
protected override void OnParametersSet()

Overrides: ComponentBase.OnParametersSet()

C#
protected virtual Task PageData()
Returns:

Task

C#
protected void ResetEditContext()
C#
protected void SetMultiColumnHeaders()
C#
protected abstract void SetSkip(int skip)
Parameters:skipint

Properties

Automatically creates columns based on data model properties when no columns are explicitly defined. Set to false to define columns manually. Cannot be used with dynamic objects (like ExpandoObject) - use explicit column definitions instead.

C#
[Parameter]
public bool AutoGenerateColumns { get; set; }

Enables column virtualization to improve performance when working with a large number of columns. This feature ensures that only the columns visible in the current viewport are rendered, reducing the rendering load and improving performance and responsiveness. This is particularly useful for grids with many columns, as it enhances scrolling performance and overall user experience.

C#
[Parameter]
public bool ColumnVirtualization { get; set; }

Requires users to confirm before deleting data items. Shows a confirmation dialog to prevent accidental deletions.

C#
[Parameter]
public bool ConfirmDelete { get; set; }

CurrentBreakpoint

AdaptiveBreakpoint

C#
public AdaptiveBreakpoint CurrentBreakpoint { get; set; }
C#
[CascadingParameter]
protected DialogFactory DialogFactory { get; set; }

Shows a loading indicator during long-running operations like data requests or exports. The default value is true. This has no effect on initial data load.

C#
[Parameter]
public bool EnableLoaderContainer { get; set; }

FilterMenuType

FilterMenuType

Determines the filter menu interface when GridFilterMode is FilterMenu. Use Menu for traditional filters or CheckBoxList for multi-select filtering.

C#
[Parameter]
public FilterMenuType FilterMenuType { get; set; }

Delay in milliseconds between when user stops typing in filter rows and when filtering is applied. Use this to prevent excessive filtering during typing. Default is 150ms.

C#
[Parameter]
public int FilterRowDebounceDelay { get; set; }

Defines the id HTML attribute of the Component.

C#
[Parameter]
public string Id { get; set; }
C#
public bool IsPopupRendering { get; }

Enables keyboard navigation through Grid cells and rows using arrow keys, Tab, Enter, and other keyboard shortcuts for accessibility.

C#
[Parameter]
public bool Navigable { get; set; }

Template displayed when the Grid has no data to show. Use this to show custom messages or call-to-action buttons for empty states.

C#
[Parameter]
public RenderFragment NoDataTemplate { get; set; }

OnAdd

EventCallback<TCommandEventArgs>

Fires when users click on the Add command button to start creating a new data item. Use this to initialize default values or prepare the edit form.

C#
[Parameter]
public EventCallback<TCommandEventArgs> OnAdd { get; set; }

OnCancel

EventCallback<TCommandEventArgs>

Fires when users cancel edit mode via the Cancel command button or Esc key. Use this to clean up temporary data or refresh state.

C#
[Parameter]
public EventCallback<TCommandEventArgs> OnCancel { get; set; }

OnCreate

EventCallback<TCommandEventArgs>

Fires when the Create command is executed. In Popup and Inline modes, this is when users save the new data item. In Incell mode, this event follows immediately the OnAdd event.

C#
[Parameter]
public EventCallback<TCommandEventArgs> OnCreate { get; set; }

OnDelete

EventCallback<TCommandEventArgs>

Fires when users click on the Delete command button or when they confirm the delete operation. See ConfirmDelete for confirmation settings.

C#
[Parameter]
public EventCallback<TCommandEventArgs> OnDelete { get; set; }

OnEdit

EventCallback<TCommandEventArgs>

Fires when users enter edit mode via the Edit command button, cell click, or Enter keypress. Use this to customize the editing experience.

C#
[Parameter]
public EventCallback<TCommandEventArgs> OnEdit { get; set; }

OnUpdate

EventCallback<TCommandEventArgs>

Fires when the Update command is executed. In Popup and Inline modes, this is when users save the data item. In Incell mode, this is when users blur the edit cell or press Enter.

C#
[Parameter]
public EventCallback<TCommandEventArgs> OnUpdate { get; set; }

Allows users to drag and drop column headers to change the column order. Enable this for customizable column arrangements.

C#
[Parameter]
public bool Reorderable { get; set; }

Allows users to drag column borders to adjust column widths interactively. Enable this for better user control over column sizing.

C#
[Parameter]
public bool Resizable { get; set; }

Enables users to drag and drop rows to reorder data. Use the GridRowDropEventArgs<TItem> event to handle row reordering logic. Not compatible with grouping functionality (Groupable).

C#
[Parameter]
public bool RowDraggable { get; set; }

Sets the height of each table row in pixels. This is required when using virtual scrolling (Virtual) for performance calculations. When virtual scrolling is enabled, both RowHeight and Height must be specified.

C#
[Parameter]
public decimal RowHeight { get; set; }

Custom template for rendering Grid rows. Use this to create completely custom row layouts instead of the default table row structure.

C#
[Parameter]
public RenderFragment<TItem> RowTemplate { get; set; }

Collection of currently selected data items when row selection is enabled. Supports two-way binding for programmatic selection management. Also set GridSelectionMode to enable selection functionality.

C#
[Parameter]
public IEnumerable<TItem> SelectedItems { get; set; }

Event triggered when the row selection changes. Use this event to handle user actions such as selecting or deselecting rows in the Grid. Pair it with the Value parameter (one-way binding) to track and respond to selection state changes.

C#
[Parameter]
public EventCallback<IEnumerable<TItem>> SelectedItemsChanged { get; set; }

Shows a menu button in column headers that provides options for sorting, filtering, grouping, and column visibility. Use ShowColumnMenu to disable the menu for specific columns.

C#
[Parameter]
public bool ShowColumnMenu { get; set; }

Enables data sorting by clicking on column headers. Users can sort data in ascending or descending order to organize information.

C#
[Parameter]
public bool Sortable { get; set; }

Controls whether users can sort by one column at a time or multiple columns simultaneously. Use Multiple for complex sorting scenarios. The available options are Single (default) and Multiple. Sortable must be enabled.

C#
[Parameter]
public SortMode SortMode { get; set; }