Skip to content

Commit ef15576

Browse files
Merge pull request syncfusion-content#4202 from Syncfusion-Content/hotfix/hotfix-v29.1.33
DOCINFRA-2341_merged_using_automation
2 parents d4f39e7 + b3eba56 commit ef15576

File tree

6 files changed

+61
-52
lines changed

6 files changed

+61
-52
lines changed

ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/edit.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -192,31 +192,6 @@ In the following code example, the Employee Name is a foreign key column. When e
192192
| -------------- | ------------- |
193193
| ![Foreign key column edit](../images/editing/on-foreign-key-column-editing.png) | ![After foreign key column edit](../images/editing/after-foreign-key-column-editing.png) |
194194

195-
## Prevent adding duplicate rows in Syncfusion ASP.NET MVC Grid with custom validation
196-
197-
The Syncfusion ASP.NET MVC Grid allows you to enforce constraints to prevent duplicate rows by customizing the validation logic within the Grid setup. This ensures data integrity by restricting duplicate entries in the **OrderID** column.
198-
199-
To prevent adding duplicate rows in the Grid, follow these steps:
200-
201-
1. Implement Custom Validation: Define the `orderIdCustomValidation` function to check whether the entered **OrderID** already exists in the [DataSource](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataSource). This allows editing an existing row without triggering a duplicate error.
202-
203-
2. Add Dynamic Validation Rules: Create the `orderIDRules` object to enforce unique **OrderID** values. Dynamically add this rule to the form during the **save** action.
204-
205-
3. Handle Validation in the [ActionBegin](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event: In the `ActionBegin` event, check if the **requestType** is **save**. Apply the validation rule before saving and cancel the action `args.cancel = true` if the validation fails.
206-
207-
For server-side validation to prevent adding duplicate rows, you can refer to the detailed guidance provided in our [knowledge base](https://support.syncfusion.com/kb/article/11608/how-to-do-server-side-validation-for-grid-in-asp-net-mvc-application). If you want to display the Grid's validation tooltip instead of the alert used in our knowledge base, you can call the `grid.editModule.formObj.validate()` method in the `Ajax/Fetch` success function to display the Grid's tooltip validation for the server side.
208-
209-
{% tabs %}
210-
{% highlight razor tabtitle="CSHTML" %}
211-
{% include code-snippet/grid/edit/prevent-add-duplicate/razor %}
212-
{% endhighlight %}
213-
{% highlight c# tabtitle="Edit-temp.cs" %}
214-
{% include code-snippet/grid/edit/prevent-add-duplicate/customvalidation.cs %}
215-
{% endhighlight %}
216-
{% endtabs %}
217-
218-
![Prevent Duplicate row](../images/editing/prevent-duplicate-row.png)
219-
220195
## How to perform CRUD action externally
221196

222197
Performing CRUD (Create, Read, Update, Delete) actions externally in the Syncfusion<sup style="font-size:70%">&reg;</sup> Grid allows you to manipulate grid data outside the grid itself. This can be useful in scenarios where you want to manage data operations programmatically.

ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/validation.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,4 +333,29 @@ namespace UrlAdaptor.Controllers
333333
{% endhighlight %}
334334
{% endtabs %}
335335

336-
![Show custom error message](../images/editing/custom-message.png)
336+
![Show custom error message](../images/editing/custom-message.png)
337+
338+
## Prevent adding duplicate rows with custom validation
339+
340+
The Syncfusion ASP.NET MVC Grid allows you to enforce constraints to prevent duplicate rows by customizing the validation logic within the Grid setup. This ensures data integrity by restricting duplicate entries in the **OrderID** column.
341+
342+
To prevent adding duplicate rows in the Grid, follow these steps:
343+
344+
1. Implement Custom Validation: Define the `orderIdCustomValidation` function to check whether the entered **OrderID** already exists in the [DataSource](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataSource). This allows editing an existing row without triggering a duplicate error.
345+
346+
2. Add Dynamic Validation Rules: Create the `orderIDRules` object to enforce unique **OrderID** values. Dynamically add this rule to the form during the **save** action.
347+
348+
3. Handle Validation in the [ActionBegin](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event: In the `ActionBegin` event, check if the **requestType** is **save**. Apply the validation rule before saving and cancel the action `args.cancel = true` if the validation fails.
349+
350+
For server-side validation to prevent adding duplicate rows, you can refer to the detailed guidance provided in our [knowledge base](https://support.syncfusion.com/kb/article/11608/how-to-do-server-side-validation-for-grid-in-asp-net-mvc-application). If you want to display the Grid's validation tooltip instead of the alert used in our knowledge base, you can call the `grid.editModule.formObj.validate()` method in the `Ajax/Fetch` success function to display the Grid's tooltip validation for the server side.
351+
352+
{% tabs %}
353+
{% highlight razor tabtitle="CSHTML" %}
354+
{% include code-snippet/grid/edit/prevent-add-duplicate/razor %}
355+
{% endhighlight %}
356+
{% highlight c# tabtitle="Edit-temp.cs" %}
357+
{% include code-snippet/grid/edit/prevent-add-duplicate/customvalidation.cs %}
358+
{% endhighlight %}
359+
{% endtabs %}
360+
361+
![Prevent Duplicate row](../images/editing/prevent-duplicate-row.png)

ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/edit.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -192,31 +192,6 @@ In the following code example, the Employee Name is a foreign key column. When e
192192
| -------------- | ------------- |
193193
| ![Foreign key column edit](../images/editing/on-foreign-key-column-editing.png) | ![After foreign key column edit](../images/editing/after-foreign-key-column-editing.png) |
194194

195-
## Prevent adding duplicate rows in Syncfusion ASP.NET Core Grid with custom validation
196-
197-
The Syncfusion ASP.NET Core Grid allows you to enforce constraints to prevent duplicate rows by customizing the validation logic within the Grid setup. This ensures data integrity by restricting duplicate entries in the **OrderID** column.
198-
199-
To prevent adding duplicate rows in the Grid, follow these steps:
200-
201-
1. Implement Custom Validation: Define the `orderIdCustomValidation` function to check whether the entered **OrderID** already exists in the [dataSource](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataSource). This allows editing an existing row without triggering a duplicate error.
202-
203-
2. Add Dynamic Validation Rules: Create the `orderIDRules` object to enforce unique **OrderID** values. Dynamically add this rule to the form during the **save** action.
204-
205-
3. Handle Validation in the [actionBegin](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event: In the `actionBegin` event, check if the **requestType** is **save**. Apply the validation rule before saving and cancel the action `args.cancel = true` if the validation fails.
206-
207-
For server-side validation to prevent adding duplicate rows, you can refer to the detailed guidance provided in our [knowledge base](https://support.syncfusion.com/kb/article/11608/how-to-do-server-side-validation-for-grid-in-asp-net-mvc-application). If you want to display the Grid's validation tooltip instead of the alert used in our knowledge base, you can call the `grid.editModule.formObj.validate()` method in the `Ajax/Fetch` success function to display the Grid's tooltip validation for the server side.
208-
209-
{% tabs %}
210-
{% highlight cshtml tabtitle="CSHTML" %}
211-
{% include code-snippet/grid/edit/prevent-add-duplicate/tagHelper %}
212-
{% endhighlight %}
213-
{% highlight c# tabtitle="Edit-temp.cs" %}
214-
{% include code-snippet/grid/edit/prevent-add-duplicate/customvalidation.cs %}
215-
{% endhighlight %}
216-
{% endtabs %}
217-
218-
![Prevent Duplicate row](../images/editing/prevent-duplicate-row.png)
219-
220195
## How to perform CRUD action externally
221196

222197
Performing CRUD (Create, Read, Update, Delete) actions externally in the Syncfusion<sup style="font-size:70%">&reg;</sup> Grid allows you to manipulate grid data outside the grid itself. This can be useful in scenarios where you want to manage data operations programmatically.

ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/validation.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,4 +337,29 @@ namespace UrlAdaptor.Controllers
337337
{% endhighlight %}
338338
{% endtabs %}
339339

340-
![Show custom error message](../images/editing/custom-message.png)
340+
![Show custom error message](../images/editing/custom-message.png)
341+
342+
## Prevent adding duplicate rows with custom validation
343+
344+
The Syncfusion ASP.NET Core Grid allows you to enforce constraints to prevent duplicate rows by customizing the validation logic within the Grid setup. This ensures data integrity by restricting duplicate entries in the **OrderID** column.
345+
346+
To prevent adding duplicate rows in the Grid, follow these steps:
347+
348+
1. Implement Custom Validation: Define the `orderIdCustomValidation` function to check whether the entered **OrderID** already exists in the [dataSource](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataSource). This allows editing an existing row without triggering a duplicate error.
349+
350+
2. Add Dynamic Validation Rules: Create the `orderIDRules` object to enforce unique **OrderID** values. Dynamically add this rule to the form during the **save** action.
351+
352+
3. Handle Validation in the [actionBegin](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event: In the `actionBegin` event, check if the **requestType** is **save**. Apply the validation rule before saving and cancel the action `args.cancel = true` if the validation fails.
353+
354+
For server-side validation to prevent adding duplicate rows, you can refer to the detailed guidance provided in our [knowledge base](https://support.syncfusion.com/kb/article/11608/how-to-do-server-side-validation-for-grid-in-asp-net-mvc-application). If you want to display the Grid's validation tooltip instead of the alert used in our knowledge base, you can call the `grid.editModule.formObj.validate()` method in the `Ajax/Fetch` success function to display the Grid's tooltip validation for the server side.
355+
356+
{% tabs %}
357+
{% highlight cshtml tabtitle="CSHTML" %}
358+
{% include code-snippet/grid/edit/prevent-add-duplicate/tagHelper %}
359+
{% endhighlight %}
360+
{% highlight c# tabtitle="Edit-temp.cs" %}
361+
{% include code-snippet/grid/edit/prevent-add-duplicate/customvalidation.cs %}
362+
{% endhighlight %}
363+
{% endtabs %}
364+
365+
![Prevent Duplicate row](../images/editing/prevent-duplicate-row.png)

ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.MVC/getting-started.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ Now, add the Syncfusion<sup style="font-size:70%">&reg;</sup> ASP.NET MVC Rich T
9191
{% highlight razor tabtitle="CSHTML" %}
9292
{% include code-snippet/rich-text-editor/basic/default/razor %}
9393
{% endhighlight %}
94+
{% highlight c# tabtitle="Controller.cs" %}
95+
{% include code-snippet/rich-text-editor/basic/default/controller.cs %}
96+
{% endhighlight %}
9497
{% endtabs %}
9598

9699
Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to run the app. Then, the Syncfusion<sup style="font-size:70%">&reg;</sup> ASP.NET MVC Rich Text Editor control will be rendered in the default web browser.

ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.NETCORE/getting-started.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ Now, add the Syncfusion<sup style="font-size:70%">&reg;</sup> ASP.NET Core Rich
9898
{% highlight cshtml tabtitle="CSHTML" %}
9999
{% include code-snippet/rich-text-editor/basic/default/tagHelper %}
100100
{% endhighlight %}
101+
{% highlight c# tabtitle="Controller.cs" %}
102+
{% include code-snippet/rich-text-editor/basic/default/controller.cs %}
103+
{% endhighlight %}
101104
{% endtabs %}
102105

103106
Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to run the app. Then, the Syncfusion<sup style="font-size:70%">&reg;</sup> ASP.NET Core Rich Text Editor control will be rendered in the default web browser.
@@ -112,6 +115,9 @@ Configure the toolbar with the tools using items field of the [`toolbarSettings`
112115
{% highlight cshtml tabtitle="CSHTML" %}
113116
{% include code-snippet/rich-text-editor/basic/toolbar/tagHelper %}
114117
{% endhighlight %}
118+
{% highlight c# tabtitle="Controller.cs" %}
119+
{% include code-snippet/rich-text-editor/basic/toolbar/controller.cs %}
120+
{% endhighlight %}
115121
{% endtabs %}
116122

117123
![ASP.NET Core Rich Text Editor with Toolbar](images/richtexteditor-with-toolbar.png)

0 commit comments

Comments
 (0)