GridTagHelper

Example

Razor
<kendo-grid>
    <allow-copy />
    <column-menu></column-menu>
    <columns></columns>
    <context-menu></context-menu>
    <datasource></datasource>
    <editable></editable>
    <excel />
    <filterable />
    <grid-alt-row-template></grid-alt-row-template>
    <grid-detail-template></grid-detail-template>
    <grid-row-template></grid-row-template>
    <grid-toolbar-template></grid-toolbar-template>
    <groupable></groupable>
    <messages />
    <no-records />
    <pageable></pageable>
    <pdf></pdf>
    <reorderable></reorderable>
    <resizable></resizable>
    <scrollable />
    <search />
    <selectable></selectable>
    <sortable />
    <toolbar></toolbar>
</kendo-grid>

ChildTags

Attributes

AttributeTypeDescription
nameStringSets the name of the component.
allow-pasteBooleanIf set to true and the selection functionality of the Grid is enabled, the user can paste the current textual content of the clipboard into the Grid.
alt-row-templateStringThe id of the template used for rendering the alternate rows in the grid.
alt-row-template-handlerStringThe id of the template used for rendering the alternate rows in the grid.
alt-row-template-idStringThe id of the template used for rendering the alternate rows in the grid.
alt-row-template-viewIHtmlContentThe id of the template used for rendering the alternate rows in the grid.
as-moduleBoolean
deferredBooleanSuppress initialization script rendering. Note that this options should be used in conjunction with DeferredScripts method.
auto-bindBooleanIf set to false, the Grid will not bind to the data source during initialization, i.e. it will not call the fetch method of the dataSource instance. In such scenarios data binding will occur when the change event of the dataSource instance is fired. By default, autoBind is set to true and the widget will bind to the data source specified in the configuration.
column-resize-handle-widthDoubleDefines the width of the column resize handle in pixels. Apply a larger value for easier grasping.
datasource-idStringSets the ID of the DataSource widget used by the Grid.
detail-templateStringThe id of the template used for rendering the detail rows in the grid.
detail-template-handlerStringThe id of the template used for rendering the detail rows in the grid.
detail-template-idStringThe id of the template used for rendering the detail rows in the grid.
detail-template-viewIHtmlContentThe id of the template used for rendering the detail rows in the grid.
encode-titlesBooleanIf set to true the column title will be HTML-encoded before it is displayed. If set to false the column title will be displayed as is.
is-in-client-templateBooleanWhen placing a Tag Helper within a Kendo Template, set the type to text/html and add the is-in-client-template="true" attribute.
context-menuBooleanIf set to true, the context menu for the Grid will be enabled. Use the context-menu TagHelper to customize the context menu.
has-client-componentBoolean
heightDoubleThe height of the grid. Numeric values are treated as pixels.When string is used the format can be "number" + "px" or "number" alone. For example: "100px" or "100".
loader-typeGridLoaderTypeDefines what loader will be used while loading the data. Possible values are: "loadingPanel" - a panel with a circular loading indicator. or "skeleton" - a skeleton enabled loader..
mobileStringCan be set to "phone". This will force the Grid to use adaptive rendering regardless of browser type.
mobile-enabledBooleanIf set to true and the Grid is viewed on mobile browser it will use adaptive rendering.
navigatableBooleanIf set to true the user could navigate the component using the keyboard navigation. By default keyboard navigation is disabled.
on-before-editStringFired when the user tries to edit or create a data item, before the editor is created. Can be used to preventing editing according to any custom logic.The event handler function context (available via the this keyword) will be set to the widget instance.
on-cancelStringFired when the user clicks the "cancel" button (in inline or popup editing mode) or closes the popup window.The event handler function context (available via the this keyword) will be set to the widget instance.
on-cell-closeStringFired when "incell" edit mode is used and the cell is going to be closed. The event is triggerd after saving or canceling the changes, but before the cell is closed.The event handler function context (available via the this keyword) will be set to the widget instance.
on-changeStringFired when the user selects or deselects a table row or cell in the grid. To retrieve the selected elements, use the select method.The event handler function context (available via the this keyword) will be set to the widget instance.The event will be fired only when the Grid is selectable.
on-changingStringFired when the user is about to select a table row or cell.The event will be fired only when the Grid is selectable.
on-column-hideStringFired when the user hides a column.The event handler function context (available via the this keyword) will be set to the widget instance.
on-column-lockStringFired when the user lock a column.The event handler function context (available via the this keyword) will be set to the widget instance.
on-column-menu-initStringFired when the column menu is initialized.The event handler function context (available via the this keyword) will be set to the widget instance.
on-column-menu-openStringFired when the grid column menu is opened, after the animations are completed.The event handler function context (available via the this keyword) will be set to the widget instance.
on-column-reorderStringFired when the user changes the order of a column.The event handler function context (available via the this keyword) will be set to the widget instance.
on-column-resizeStringFired when the user resizes a column.The event handler function context (available via the this keyword) will be set to the widget instance.
on-column-showStringFired when the user shows a column.The event handler function context (available via the this keyword) will be set to the widget instance.
on-column-stickStringFired when the user sticks a column.The event handler function context (available via the this keyword) will be set to the widget instance.
on-column-unlockStringFired when the user unlock a column.The event handler function context (available via the this keyword) will be set to the widget instance.
on-column-unstickStringFired when the user unsticks a column.The event handler function context (available via the this keyword) will be set to the widget instance.
on-data-bindingStringFired before the widget binds to its data source.The event handler function context (available via the this keyword) will be set to the widget instance.
on-data-boundStringFired when the widget is bound to data from its data source.The event handler function context (available via the this keyword) will be set to the widget instance.
on-detail-collapseStringFired when the user collapses a detail table row.The event handler function context (available via the this keyword) will be set to the widget instance.
on-detail-expandStringFired when the user expands a detail table row.The event handler function context (available via the this keyword) will be set to the widget instance.
on-detail-initStringFired when a detail table row is initialized.The event handler function context (available via the this keyword) will be set to the widget instance.
on-editStringFired when the user edits or creates a data item.The event handler function context (available via the this keyword) will be set to the widget instance.
on-excel-exportStringFired when the user clicks the "Export to Excel" toolbar button.
on-filterStringFired when the user is about to filter the DataSource via the filter UI.The event handler function context (available via the this keyword) will be set to the widget instance.Introduced in the Kendo UI 2016 R3 (2016.3.914) release.
on-filter-menu-initStringFired when the grid filter menu is initialized, when it is opened for the first time.The event handler function context (available via the this keyword) will be set to the widget instance.
on-filter-menu-openStringFired when the grid filter menu is opened, after the animations are completed.The event handler function context (available via the this keyword) will be set to the widget instance.
on-groupStringFired when the user is about to group the DataSource or modify the group descriptors state via the Grid group panel.The event handler function context (available via the this keyword) will be set to the widget instance.Introduced in the Kendo UI 2016 R3 (2016.3.914) release.
on-group-collapseStringFired when the user collapses a group row.The event handler function context (available via the this keyword) will be set to the widget instance.Introduced in the Kendo UI 2017 R3 (2017.3.913) release.
on-group-expandStringFired when the user expands a group row.The event handler function context (available via the this keyword) will be set to the widget instance.Introduced in the Kendo UI 2017 R3 (2017.3.913) release.
on-navigateStringFired when navigatable is enabled and the user change current item with either mouse or keyboard interaction.The event handler function context (available via the this keyword) will be set to the widget instance.
on-pageStringFired when the user is about change the current page index of DataSource via the pager UI.The event handler function context (available via the this keyword) will be set to the widget instance.Introduced in the Kendo UI 2016 R3 (2016.3.914) release.
on-pasteStringFired when the user pastes data using the Grid's built-in paste mechanism.The event handler function context (available via the this keyword) will be set to the widget instance.
on-pdf-exportStringFired when the user clicks the "Export to PDF" toolbar button.
on-removeStringFired when the user clicks the "destroy" command button and delete operation is confirmed in the confirmation window, if the cancel button in the window is clicked the event will not be fired.The event handler function context (available via the this keyword) will be set to the widget instance.
on-row-reorderStringFired when the user changes the order of a row.The event handler function context (available via the this keyword) will be set to the widget instance.
on-row-resizeStringFired when the user resizes a row (rows).The event handler function context (available via the this keyword) will be set to the widget instance.
on-saveStringFired when a data item is saved.The event handler function context (available via the this keyword) will be set to the widget instance.
on-save-changesStringFired when the user clicks the "save" command button.The event handler function context (available via the this keyword) will be set to the widget instance.
on-sortStringFired when the user is about to modify the current state of sort descriptors of DataSource via the sort UI.The event handler function context (available via the this keyword) will be set to the widget instance.Introduced in the Kendo UI 2016 R3 (2016.3.914) release.
persist-selectionBooleanSets a value indicating whether the selection will be persisted when sorting, paging, filtering and etc are performed.
resizable-enabledBooleanIf set to true, column resizing will be enabled. Use the resizable TagHelper to enable row resizing
row-templateStringThe id of the template used for rendering the rows in the grid.
row-template-handlerStringThe id of the template used for rendering the rows in the grid.
row-template-idStringThe id of the template used for rendering the rows in the grid.
row-template-viewIHtmlContentThe id of the template used for rendering the rows in the grid.
sanitize-idBoolean
script-attributesIDictionary<String,Object>
selectableStringSpecifies the selection type of the grid.
sizeComponentSize
status-bar-templateStringThe template which renders the Status Bar/Aggregates Bar.
status-bar-template-handlerStringThe template which renders the Status Bar/Aggregates Bar.
status-bar-template-idStringThe template which renders the Status Bar/Aggregates Bar.
status-bar-template-viewIHtmlContentThe template which renders the Status Bar/Aggregates Bar.
widthStringSets the width of the Grid.
In this article
ExampleChildTagsAttributes
Not finding the help you need?
Contact Support