Skip to content

Commit 01bcaa8

Browse files
authored
docs(grid, treelist): linked popup templates articles in customization (#1475)
* docs(grid, treelist): linked popup templates articles in customization section and enhanced form template articles
1 parent a10fb42 commit 01bcaa8

File tree

17 files changed

+65
-33
lines changed

17 files changed

+65
-33
lines changed

components/gantt/gantt-tree/editing/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,5 +566,5 @@ There are a few considerations to keep in mind with the CUD operations of the tr
566566
## See Also
567567

568568
* [Live Demo: Gantt Inline Editing](https://demos.telerik.com/blazor-ui/treelist/editing-inline)
569-
* [Live Demo: Gantt PopUp Editing](https://demos.telerik.com/blazor-ui/treelist/editing-popup)
569+
* [Live Demo: Gantt Popup Editing](https://demos.telerik.com/blazor-ui/treelist/editing-popup)
570570
* [Live Demo: Gantt InCell Editing](https://demos.telerik.com/blazor-ui/treelist/editing-incell)

components/gantt/gantt-tree/editing/popup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ In a similar fashion, the `Cancel`, `Delete` command buttons and the `Add` toolb
2323

2424
You can also cancel the events by setting the `IsCancelled` property of the event arguments to `true`. This lets you prevent the user from editing certain records, inserting or deleting items, based on your application logic.
2525

26-
To enable PopUp editing in the Gantt Tree, set its `TreeListEditMode` property to `GanttTreeListEditMode.Popup`, then handle the CRUD events as shown in the example below.
26+
To enable Popup editing in the Gantt Tree, set its `TreeListEditMode` property to `GanttTreeListEditMode.Popup`, then handle the CRUD events as shown in the example below.
2727

2828

2929
>caption The Command buttons and the Gantt events let you handle data operations in Popup edit mode.

components/grid/editing/built-in-dialogs/delete-confirmation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The delete confirmation dialog triggers before item deletion. You can enable it
9595
## See Also
9696

9797
* [Live Demo: Grid Inline Editing](https://demos.telerik.com/blazor-ui/grid/editing-inline)
98-
* [Live Demo: Grid PopUp Editing](https://demos.telerik.com/blazor-ui/grid/editing-popup)
98+
* [Live Demo: Grid Popup Editing](https://demos.telerik.com/blazor-ui/grid/editing-popup)
9999
* [Live Demo: Grid InCell Editing](https://demos.telerik.com/blazor-ui/grid/editing-incell)
100100
* [Live Demo: Grid Custom Editor Template](https://demos.telerik.com/blazor-ui/grid/custom-editor)
101101
* [Live Demo: Grid Custom Edit Form](https://demos.telerik.com/blazor-ui/grid/editing-custom-form)

components/grid/editing/built-in-dialogs/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The default texts of the dialogs are exposed in the [localization]({%slug global
2121
## See Also
2222

2323
* [Live Demo: Grid Inline Editing](https://demos.telerik.com/blazor-ui/grid/editing-inline)
24-
* [Live Demo: Grid PopUp Editing](https://demos.telerik.com/blazor-ui/grid/editing-popup)
24+
* [Live Demo: Grid Popup Editing](https://demos.telerik.com/blazor-ui/grid/editing-popup)
2525
* [Live Demo: Grid InCell Editing](https://demos.telerik.com/blazor-ui/grid/editing-incell)
2626
* [Live Demo: Grid Custom Editor Template](https://demos.telerik.com/blazor-ui/grid/custom-editor)
2727
* [Live Demo: Grid Custom Edit Form](https://demos.telerik.com/blazor-ui/grid/editing-custom-form)

components/grid/editing/incell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Click a cell, edit it and click outside of the grid to see the change. You can a
196196

197197
* The `OnCreate` event will fire as soon as you click the `Add` button. The Grid will render the new row and enter edit mode for the first editable column (to fire `OnEdit` and let the user alter the column). This means you should have [default values]({%slug grid-kb-default-value-for-new-row%}) that satisfy any initial validation and requirements your models may have.
198198

199-
* This means that there is no actual inserted item, an item in InCell editing is always in Edit mode, never in Insert mode. Thus, you cannot use the `InsertedItem` field of the Grid [State]({%slug grid-state%}). If you want to insert items programmatically in the Grid, alter the `Data` collection, and use the `OriginalEditItem` feature of the state (see the [Initiate Editing or Inserting of an Item]({%slug grid-state%}#initiate-editing-or-inserting-of-an-item) example - it can put the InLine and PopUp edit modes in Insert mode, but this cannot work for InCell editing).
199+
* This means that there is no actual inserted item, an item in InCell editing is always in Edit mode, never in Insert mode. Thus, you cannot use the `InsertedItem` field of the Grid [State]({%slug grid-state%}). If you want to insert items programmatically in the Grid, alter the `Data` collection, and use the `OriginalEditItem` feature of the state (see the [Initiate Editing or Inserting of an Item]({%slug grid-state%}#initiate-editing-or-inserting-of-an-item) example - it can put the InLine and Popup edit modes in Insert mode, but this cannot work for InCell editing).
200200

201201
* The `OnEdit` event fires every time a cell is opened for editing. Until version **2.27**, the event fired **once per row** - when the user edits a cell from a different row.
202202

components/grid/editing/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ There are a few considerations to keep in mind with the CUD operations of the gr
452452
## See Also
453453
454454
* [Live Demo: Grid Inline Editing](https://demos.telerik.com/blazor-ui/grid/editing-inline)
455-
* [Live Demo: Grid PopUp Editing](https://demos.telerik.com/blazor-ui/grid/editing-popup)
455+
* [Live Demo: Grid Popup Editing](https://demos.telerik.com/blazor-ui/grid/editing-popup)
456456
* [Live Demo: Grid InCell Editing](https://demos.telerik.com/blazor-ui/grid/editing-incell)
457457
* [Live Demo: Grid Custom Editor Template](https://demos.telerik.com/blazor-ui/grid/custom-editor)
458458
* [Live Demo: Grid Custom Edit Form](https://demos.telerik.com/blazor-ui/grid/editing-custom-form)

components/grid/editing/popup.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
---
2-
title: PopUp Editing
3-
page_title: Grid - PopUp Editing
2+
title: Popup Editing
3+
page_title: Grid - Popup Editing
44
description: Popup editing of data in Grid for Blazor.
55
slug: components/grid/editing/popup
6-
tags: telerik,blazor,grid,PopUp,editing
6+
tags: telerik,blazor,grid,Popup,editing
77
published: True
88
position: 2
99
---
1010

11-
# Grid PopUp Editing
11+
# Grid Popup Editing
1212

1313
In this article:
1414

1515
* [Basics](#basics)
1616
* [Customization](#customization)
17+
* [Popup Customization](#popup-customization)
18+
* [Edit Form Customization](#edit-form-customization)
19+
* [Popup Form Customization](#popup-form-customization)
20+
* [Popup Buttons Customization](#popup-buttons-customization)
1721

1822
## Basics
1923

@@ -23,12 +27,12 @@ In a similar fashion, the `Cancel`, `Delete` command buttons and the `Add` toolb
2327

2428
You can also cancel the events by setting the `IsCancelled` property of the event arguments to `true`. This lets you prevent the user from editing certain records, inserting or deleting items, based on your application logic.
2529

26-
To enable PopUp editing in the grid, set its `EditMode` property to `Telerik.Blazor.GridEditMode.Popup`, then handle the CRUD events as shown in the example below.
30+
To enable Popup editing in the grid, set its `EditMode` property to `Telerik.Blazor.GridEditMode.Popup`, then handle the CRUD events as shown in the example below.
2731

28-
The PopUp editing mode supports [validation]({%slug common-features/input-validation%}). To use it, all you need to do is decorate your model with the desired annotations. Validation errors will be shown in the popup and will prevent the Update operation.
32+
The Popup editing mode supports [validation]({%slug common-features/input-validation%}). To use it, all you need to do is decorate your model with the desired annotations. Validation errors will be shown in the popup and will prevent the Update operation.
2933

3034

31-
>caption The Command buttons and the grid events let you handle data operations in PopUp edit mode (see the code comments for details)
35+
>caption The Command buttons and the grid events let you handle data operations in Popup edit mode (see the code comments for details)
3236
3337
````CSHTML
3438
@using System.ComponentModel.DataAnnotations
@@ -260,9 +264,17 @@ The `GridPopupEditFormSettings` nested tag exposes the following parameters to a
260264
}
261265
````
262266

267+
### Popup Form Customization
268+
269+
In the `GridPopupEditFormSettings`, you can declare a `FormTemplate`. This template enables you to fully customize the appearance and content of the create/edit Popup window in the Grid. For more information and examples on customizing the Grid Popup window, refer to the [Popup Form Template]({%slug grid-templates-popup-form%}) article.
270+
271+
### Popup Buttons Customization
272+
273+
You can specify a `ButtonsTemplate` in the `GridPopupEditFormSettings` to customize how the buttons look in the create/edit Popup window of the Grid. To learn more and see an example of customizing the Grid Popup buttons, refer to the [Popup Buttons Template]({%slug grid-templates-popup-buttons%}) article.
274+
263275
## See Also
264276

265-
* [Live Demo: Grid PopUp Editing](https://demos.telerik.com/blazor-ui/grid/editing-popup)
277+
* [Live Demo: Grid Popup Editing](https://demos.telerik.com/blazor-ui/grid/editing-popup)
266278
* [Custom Editor Template Per Field]({%slug components/grid/features/templates%}#edit-template)
267279
* [Custom Editor Layout](https://github.com/telerik/blazor-ui/tree/master/grid/custom-popup-form)
268280

components/grid/selection/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ In the [Incell EditMode]({%slug components/grid/editing/incell%}) selection can
144144

145145
To see how to select the row that is being edited in InCell edit mode without using a `<GridCheckboxColumn />` check out the [Row Selection in Edit with InCell EditMode]({%slug grid-kb-row-select-incell-edit%}) Knowledge Base article.
146146

147-
#### Inline and PopUp Edit Modes
147+
#### Inline and Popup Edit Modes
148148

149-
In [Inline EditMode]({%slug components/grid/editing/inline%}) and [PopUp EditMode]({%slug components/grid/editing/popup%}) selection can be done by clicking on the desired row or by using a `<GridCheckboxColumn />`.
149+
In [Inline EditMode]({%slug components/grid/editing/inline%}) and [Popup EditMode]({%slug components/grid/editing/popup%}) selection can be done by clicking on the desired row or by using a `<GridCheckboxColumn />`.
150150

151151
### Selection in Template
152152

components/grid/sizing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ You can increase or decrease the size of the Grid by setting the `Size` attribut
5454

5555
## Notes
5656

57-
1. The `Size` option does not affect elements displayed inside a PopUp (such as [Filter Menu]({%slug grid-filter-menu%}), [Column Menu]({%slug grid-column-menu%}), etc.). By design, all PopUp elements are rendered on root level, so they are not technically inside the Grid. Thus, the `Size` option cannot propagate to them. Тo change the `Size` options of the elements inside PopUps, you can use a template(where available), so you can override the built-in rendering. You can then add custom elements and explicitly specify their `Size`.
57+
1. The `Size` option does not affect elements displayed inside a Popup (such as [Filter Menu]({%slug grid-filter-menu%}), [Column Menu]({%slug grid-column-menu%}), etc.). By design, all Popup elements are rendered on root level, so they are not technically inside the Grid. Thus, the `Size` option cannot propagate to them. Тo change the `Size` options of the elements inside Popups, you can use a template(where available), so you can override the built-in rendering. You can then add custom elements and explicitly specify their `Size`.
5858

5959
1. The `Size` option does not propagate to components rendered inside templates (this includes elements in [GridToolBar]({%slug components/grid/features/toolbar%}), [CommandColumn]({%slug components/grid/columns/command%}), etc.). To change the size of the elements in those components you have to set it explicitly.
6060

components/grid/templates/popup-form-template.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ position: 50
1111

1212
# Popup Form Template
1313

14-
With the `FormTemplate` feature, you can customize the appearance and content of the create/edit Popup window of the Grid.
14+
With the `FormTemplate` feature, you can customize the appearance and content of the create/edit Popup window of the Grid. Declare the desired custom content inside the `<FormTemplate>` inner tag of the `<GridPopupEditFormSettings>`.
15+
16+
You can use the `Context` attribute of the `<FormTemplate>` tag to set the name of the context variable. The context variable is of type `object` and can be cast to the model type to which the Grid is bound.
17+
18+
>When using the template, the default Popup form is replaced by the declared content within the `FormTemplate` tag. Consequently, the default `Update` and `Cancel` buttons are removed. This means the [`OnUpdate` and `OnCancel`](https://docs.telerik.com/blazor-ui/components/grid/events#cud-events) events cannot be triggered. To modify or cancel the update of a record, you need to include custom controls to manage these actions.
1519
1620
>caption Using a `FormTemplate` to modify the Edit/Create Popup window.
1721

0 commit comments

Comments
 (0)