Skip to content

Commit 6f07294

Browse files
chore(grid): events article; updated overview sample
1 parent 9e9008f commit 6f07294

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

components/grid/events.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Events
3+
page_title: Grid for Blazor | Events
4+
description: Events of the Grid for Blazor
5+
slug: grid-events
6+
tags: telerik,blazor,grid,events
7+
published: True
8+
position: 100
9+
---
10+
11+
# Grid Events
12+
13+
This article explains the events available in the Telerik Grid for Blazor. They are grouped logically.
14+
15+
* [CUD Events](#cud-events) - events related to Creating, Updating and Deleting items
16+
* [Read Event](#read-event) - event related to obtaining data
17+
* [Other Events](#other-events) - other events the grid provides
18+
* [Command Button Click](#command-button-click)
19+
20+
## CUD Events
21+
22+
The `OnCreate`, `OnUpdate` and `OnDelete` events let you get the data item that the user changed so you can transfer the user action to the actual data source.
23+
24+
The `OnEdit` and `OnCancel` events let you respond to user actions - when they want to edit an item and when the want to cancel changes on an item they have been editing. You can use them to, for example, prevent editing of certain items based on some condition.
25+
26+
You can read more about the CUD events in the [Editing Overview]({%slug components/grid/editing/overview%}) article.
27+
28+
## Read Event
29+
30+
In the common case, you provide all the data to the grid's `Data` collection and the grid performs operations like paging, filtering, sorting on it for you. In some cases you may want to do this with your own code (for example, to retrieve only a small number of items in order to improve the backend performance). You can do this by attaching to the `OnRead` event where you can perform all the data read operations in the grid. You can read more about them in the [Manual Data Source Operations]({%slug components/grid/manual-operations%}) article.
31+
32+
33+
## Other Events
34+
35+
## Command Button Click
36+
37+
The command buttons of a grid provide an `OnClick` event before firing their built-in command (such as opening a row for editing, or adding a new row). You can do this to implement some additional logic and to also handle custom commands - both from a [Command Column]({%slug components/grid/columns/command%}), and from a [Toolbar Button]({%slug components/grid/features/toolbar%})
38+
39+
## See Also
40+
41+
* [Grid Overview]({%slug components/grid/overview%})
42+
* [Grid Editing Overview]({%slug components/grid/editing/overview%})
43+
* [Manual Data Source Operations]({%slug components/grid/manual-operations%})
-1005 Bytes
Loading

components/grid/overview.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ General grid with its most common features
2525
2626
<TelerikGrid Data="@MyData" Height="400px"
2727
Pageable="true" Sortable="true" Groupable="true"
28-
FilterMode="Telerik.Blazor.GridFilterMode.FilterRow">
28+
FilterMode="Telerik.Blazor.GridFilterMode.FilterRow"
29+
Resizable="true" Reorderable="true">
2930
<GridColumns>
30-
<GridColumn Field="@(nameof(SampleData.Id))" />
31+
<GridColumn Field="@(nameof(SampleData.Id))" Width="120px" />
3132
<GridColumn Field="@(nameof(SampleData.Name))" Title="Employee Name" Groupable="false" />
3233
<GridColumn Field="@(nameof(SampleData.Team))" Title="Team" />
3334
<GridColumn Field="@(nameof(SampleData.HireDate))" Title="Hire Date" />

components/grid/toolbar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ In this article, you will learn how to use:
2727

2828
The grid offers built-in commands that you can invoke through its toolbar. To use them, set the `Command` property of the button to the command name. The built-in command names are:
2929

30-
* `Add` - startes inserting a new item in the grid.
30+
* `Add` - starts inserting a new item in the grid.
3131

3232
>caption How to insert a new item in the grid
3333

0 commit comments

Comments
 (0)