You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/grid/editing/incell.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,8 @@ This section explains what happens when the user tries to perform another data o
72
72
* If the validation is satisfied, then editing completes and the component fires `OnUpdate`.
73
73
* If the validation is not satisfied, then editing aborts and the component fires `OnCancel`.
74
74
75
+
Deleting items that are currently in edit mode [fires `OnDelete` with a cloned data item instance](slug:grid-editing-overview#delete-operations).
76
+
75
77
### Selection
76
78
77
79
To enable [row selection](slug:grid-selection-row) with in-cell edit mode, use a [checkbox column](slug:components/grid/columns/checkbox). More information on that can be read in the [Row Selection](slug:grid-selection-row#selection-and-editing-modes) article.
Copy file name to clipboardExpand all lines: components/grid/editing/inline.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,8 @@ This section explains what happens when the component is already in add or edit
54
54
55
55
If the component is already in add or edit mode, and the user tries to perform another data operation, then editing aborts and the component fires `OnCancel`.
56
56
57
+
Deleting items that are currently in edit mode [fires `OnDelete` with a cloned data item instance](slug:grid-editing-overview#delete-operations).
Copy file name to clipboardExpand all lines: components/grid/editing/overview.md
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ The Grid CRUD operations rely on the following algorithm:
35
35
Adding or editing rows in the Grid sets the following requirements on the Grid model:
36
36
37
37
* The Grid model class must have a parameterless constructor. Otherwise, use the [Grid `OnModelInit` event](slug:grid-events#onmodelinit) to provide a data item instance [when the Grid needs to create one](#item-instances). Optinally, you can also [set some default values](slug://grid-kb-default-value-for-new-row).
38
+
* There must be a non-editable property that serves as a unique identifier.
38
39
* All editable properties must be `public` and have setters. These properties must not be `readonly`.
39
40
* All complex properties used in the Grid must be instantiated in the [Grid `OnModelInit` event](slug:grid-events#onmodelinit).
40
41
* Self-referencing or inherited properties must not cause `StackOverflowException` or `AmbiguousMatchException` during [programmatic model instance creation](#item-instances).
@@ -79,6 +80,8 @@ Delete operations provide the same user experience in all Grid edit modes and re
79
80
80
81
Delete operations can work even if the Grid `EditMode` parameter value is `None`.
81
82
83
+
If the Grid contains Delete command buttons that display and operate in edit mode, these buttons will fire the [`OnDelete` event](#events) with a [cloned data item instance](#item-instances) in the [event argument](#gridcommandeventargs). To find the original data item in the Grid data source, use the item ID or [override the `Equals()` method of the Grid model class](slug://grid-kb-editing-in-hierarchy).
84
+
82
85
>tip See the delete operations in action in the complete examples for Grid [inline](slug:grid-editing-inline#examples), [in-cell](slug:grid-editing-incell#examples), and [popup](slug:grid-editing-popup#examples) editing. Also check how to [customize the Delete Confirmation Dialog](slug:grid-kb-customize-delete-confirmation-dialog).
83
86
84
87
## Commands
@@ -97,7 +100,9 @@ Users execute commands in the following ways:
97
100
* By clicking on editable cells in [in-cell edit mode](slug:grid-editing-incell) and then anywhere else on the page.
98
101
* By using the [Grid keyboard navigation](https://demos.telerik.com/blazor-ui/grid/keyboard-navigation).
99
102
100
-
Command buttons can only reside in a [Grid Command Column](slug:components/grid/columns/command) or the [Grid ToolBar](slug:components/grid/features/toolbar). You can also [trigger add and edit operations programmatically](slug:grid-kb-add-edit-state) from anywhere on the web page through the [Grid State](slug:grid-state).
103
+
Command buttons can only reside in a [Grid Command Column](slug:components/grid/columns/command) or the [Grid ToolBar](slug:components/grid/features/toolbar). Each command button in the command column is visible only in display mode or only in edit mode, depending on the button's `ShowInEdit` boolean parameter value.
104
+
105
+
You can also [trigger add and edit operations programmatically](slug:grid-kb-add-edit-state) from anywhere on the web page through the [Grid State](slug:grid-state).
101
106
102
107
## Events
103
108
@@ -110,7 +115,7 @@ The following table describes the Grid events, which are related to adding, dele
110
115
|`OnAdd`| No | Fires on `Add`[command button](slug://components/grid/columns/command) click, before the Grid enters add mode. This event preceeds `OnCreate` or `OnCancel`. |[New](#item-instances)| Grid remains in read mode. |
111
116
|`OnCancel`| No | Fires on `Cancel` command invocation. |[New or cloned](#item-instances)| Grid remains in add or edit mode. |
112
117
|`OnCreate`| To add new items. | Fires on `Save` command invocation for new items. This event succeeds `OnAdd`. |[New](#item-instances)| Grid remains in add mode. |
113
-
|`OnDelete`| To [delete items](#delete-operations). | Fires on `Delete` command button click. | Original | Grid won't rebind. Deletion depends on the app itself. |
118
+
|`OnDelete`| To [delete items](#delete-operations). | Fires on `Delete` command button click. |[Original or cloned](#item-instances)| Grid won't rebind. Deletion depends on the app itself. |
114
119
|`OnEdit`| No | Fires on `Edit` command invocation, before the Grid actually enters edit mode. This event preceeds `OnUpdate` or `OnCancel`. | Original | Grid remains in read mode. |
115
120
|`OnModelInit`|[Depends on the Grid model type](slug:grid-events#onmodelinit)| Fires when the Grid requires a [new model instance](#item-instances), which is immediately before `OnAdd` or immediately after `OnEdit`. <br /> Use this event when the Grid model type is an [interface, abstract class, or has no parameterless constructor](slug:grid-events#onmodelinit). | No event arguments | Not cancellable |
116
121
|`OnUpdate`| To edit existing items. | Fires on `Save` command invocation for existing items. This event succeeds `OnEdit`. |[Cloned](#item-instances)| Grid remains in edit mode. |
Copy file name to clipboardExpand all lines: components/treelist/editing/incell.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,8 @@ This section explains what happens when the user tries to perform another data o
72
72
* If the validation is satisfied, then editing completes and the component fires `OnUpdate`.
73
73
* If the validation is not satisfied, then editing aborts and the component fires `OnCancel`.
74
74
75
+
Deleting items that are currently in edit mode [fires `OnDelete` with a cloned data item instance](slug:treelist-editing-overview#delete-operations).
76
+
75
77
### Selection
76
78
77
79
To enable [row selection](slug:treelist-selection-row) with in-cell edit mode, use a [checkbox column](slug:treelist-columns-checkbox). More information on that can be read in the [Row Selection](slug:treelist-selection-row#selection-and-editing-modes) article.
Copy file name to clipboardExpand all lines: components/treelist/editing/inline.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,8 @@ This section explains what happens when the component is already in add or edit
54
54
55
55
If the component is already in add or edit mode, and the user tries to perform another data operation, then editing aborts and the component fires `OnCancel`.
56
56
57
+
Deleting items that are currently in edit mode [fires `OnDelete` with a cloned data item instance](slug:treelist-editing-overview#delete-operations).
Copy file name to clipboardExpand all lines: components/treelist/editing/overview.md
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ The TreeList CRUD operations rely on the following algorithm:
35
35
Adding or editing rows in the TreeList sets the following requirements on the TreeList model:
36
36
37
37
* The TreeList model class must have a parameterless constructor. Otherwise, use the [TreeList `OnModelInit` event](slug:treelist-events#onmodelinit) to provide a data item instance [when the TreeList needs to create one](#item-instances). Optinally, you can also [set some default values](slug://grid-kb-default-value-for-new-row).
38
+
* There must be a non-editable property that serves as a unique identifier.
38
39
* All editable properties must be `public` and have setters. These properties must not be `readonly`.
39
40
* Self-referencing or inherited properties must not cause `StackOverflowException` or `AmbiguousMatchException` during [programmatic model instance creation](#item-instances).
40
41
@@ -78,6 +79,8 @@ Delete operations provide the same user experience in all TreeList edit modes an
78
79
79
80
Delete operations can work even if the TreeList `EditMode` parameter value is `None`.
80
81
82
+
If the TreeList contains Delete command buttons that display and operate in edit mode, these buttons will fire the [`OnDelete` event](#events) with a [cloned data item instance](#item-instances) in the [event argument](#treelistcommandeventargs). To find the original data item in the TreeList data source, use the item ID or [override the `Equals()` method of the TreeList model class](slug:grid-kb-save-load-state-localstorage).
83
+
81
84
>tip See the delete operations in action in the complete examples for TreeList [inline](slug:treelist-editing-inline#example), [in-cell](slug:treelist-editing-incell#example) and [popup](slug:treelist-editing-popup#example) editing. Also check how to [customize the Delete Confirmation Dialog](slug:grid-kb-customize-delete-confirmation-dialog).
82
85
83
86
## Commands
@@ -96,7 +99,9 @@ Users execute commands in the following ways:
96
99
* By clicking on editable cells in [in-cell edit mode](slug:treelist-editing-incell) and then anywhere else on the page.
97
100
* By using the [TreeList keyboard navigation](https://demos.telerik.com/blazor-ui/treelist/keyboard-navigation).
98
101
99
-
Command buttons can only reside in a [TreeList Command Column](slug:treelist-columns-command) or the [TreeList ToolBar](slug:treelist-toolbar). You can also [trigger add and edit operations programmatically](slug:grid-kb-add-edit-state) from anywhere on the web page through the [TreeList State](slug:treelist-state).
102
+
Command buttons can only reside in a [TreeList Command Column](slug:treelist-columns-command) or the [TreeList ToolBar](slug:treelist-toolbar). Each command button in the command column is visible only in display mode or only in edit mode, depending on the button's `ShowInEdit` boolean parameter value
103
+
104
+
You can also [trigger add and edit operations programmatically](slug:grid-kb-add-edit-state) from anywhere on the web page through the [TreeList State](slug:treelist-state).
100
105
101
106
## Events
102
107
@@ -109,7 +114,7 @@ The following table describes the TreeList events, which are related to adding,
109
114
|`OnAdd`| No | Fires on `Add`[command button](slug://treelist-columns-command) click, before the TreeList enters add mode. This event preceeds `OnCreate` or `OnCancel`. |[New](#item-instances)| TreeList remains in read mode. |
110
115
|`OnCancel`| No | Fires on `Cancel` command invocation. |[New or cloned](#item-instances)| TreeList remains in add or edit mode. |
111
116
|`OnCreate`| To add new items. | Fires on `Save` command invocation for new items. This event succeeds `OnAdd`. |[New](#item-instances)| TreeList remains in add mode. |
112
-
|`OnDelete`| To [delete items](#delete-operations). | Fires on `Delete` command button click. | Original | TreeList won't rebind. Deletion depends on the app itself. |
117
+
|`OnDelete`| To [delete items](#delete-operations). | Fires on `Delete` command button click. |[Original or cloned](#item-instances)| TreeList won't rebind. Deletion depends on the app itself. |
113
118
|`OnEdit`| No | Fires on `Edit` command invocation, before the TreeList actually enters edit mode. This event preceeds `OnCreate` or `OnCancel`. | Original | TreeList remains in read mode. |
114
119
|`OnModelInit`|[Depends on the TreeList model type](slug:treelist-events#onmodelinit)| Fires when the TreeList requires a [new model instance](#item-instances), which is immediately before `OnAdd` or immediately after `OnEdit`. <br /> Use this event when the TreeList model type is an [interface, abstract class, or has no parameterless constructor](slug:treelist-events#onmodelinit). | No event arguments | Not cancellable |
115
120
|`OnUpdate`| To edit existing items. | Fires on `Save` command invocation for existing items. This event succeeds `OnEdit`. |[Cloned](#item-instances)| TreeList remains in edit mode. |
0 commit comments