Skip to content

Commit d9f3683

Browse files
docs(grid): popup editing validation
1 parent 8b77b84 commit d9f3683

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/grid/editing/popup.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ You can also cancel the events by setting the `IsCancelled` property of the even
1818

1919
To enable PopUp editing in the grid, set its `EditMode` property to `popup`, then handle the CRUD events as shown in the example below.
2020

21+
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.
22+
2123
@[template](/_contentTemplates/grid/common-link.md#async-events-link)
2224

2325
>caption The Command buttons and the grid events let you handle data operations in PopUp edit mode
2426
2527
````CSHTML
2628
@using Telerik.Blazor
2729
@using Telerik.Blazor.Components.Grid
30+
@using System.ComponentModel.DataAnnotations
2831
2932
<strong>Editing is cancelled for the first two records.</strong>
3033
@@ -128,6 +131,8 @@ To enable PopUp editing in the grid, set its `EditMode` property to `popup`, the
128131
public class SampleData
129132
{
130133
public int ID { get; set; }
134+
135+
[Required(ErrorMessage = "The employee must have a name")]
131136
public string Name { get; set; }
132137
}
133138

0 commit comments

Comments
 (0)