diff --git a/ej2-asp-core-mvc/Release-notes/28.1.39.md b/ej2-asp-core-mvc/Release-notes/28.1.39.md new file mode 100644 index 0000000000..e565ce9a01 --- /dev/null +++ b/ej2-asp-core-mvc/Release-notes/28.1.39.md @@ -0,0 +1,16 @@ +--- +title: Essential Studio for ##Platform_Name## Weekly Release Release Notes +description: Essential Studio for ##Platform_Name## Weekly Release Release Notes +platform: ej2-asp-core-mvc +documentation: ug +--- + +# Essential Studio for ##Platform_Name## Release Notes + +{% include release-info.html date="January 14, 2025" version="v28.1.39" %} + +{% directory path: _includes/release-notes/v28.1.39 %} + +{% include {{file.url}} %} + +{% enddirectory %} \ No newline at end of file diff --git a/ej2-asp-core-mvc/Release-notes/28.1.41.md b/ej2-asp-core-mvc/Release-notes/28.1.41.md new file mode 100644 index 0000000000..a7ed519b7c --- /dev/null +++ b/ej2-asp-core-mvc/Release-notes/28.1.41.md @@ -0,0 +1,16 @@ +--- +title: Essential Studio for ##Platform_Name## Weekly Release Release Notes +description: Essential Studio for ##Platform_Name## Weekly Release Release Notes +platform: ej2-asp-core-mvc +documentation: ug +--- + +# Essential Studio for ##Platform_Name## Release Notes + +{% include release-info.html date="January 21, 2025" version="v28.1.41" %} + +{% directory path: _includes/release-notes/v28.1.41 %} + +{% include {{file.url}} %} + +{% enddirectory %} \ No newline at end of file diff --git a/ej2-asp-core-mvc/avatar/EJ2_ASP.MVC/getting-started.md b/ej2-asp-core-mvc/avatar/EJ2_ASP.MVC/getting-started.md index f7ccf7d573..ae950d186e 100644 --- a/ej2-asp-core-mvc/avatar/EJ2_ASP.MVC/getting-started.md +++ b/ej2-asp-core-mvc/avatar/EJ2_ASP.MVC/getting-started.md @@ -11,7 +11,7 @@ documentation: ug # Getting Started with ASP.NET MVC Avatar Control -This section briefly explains about how to include [ASP.NET MVC Avatar](https://www.syncfusion.com/aspnet-mvc-ui-controls/avatar) control in your ASP.NET MVC application using Visual Studio. +This section explains about how to include [ASP.NET MVC Avatar](https://www.syncfusion.com/aspnet-mvc-ui-controls/avatar) control in your ASP.NET MVC application using Visual Studio. ## Prerequisites @@ -25,7 +25,7 @@ This section briefly explains about how to include [ASP.NET MVC Avatar](https:// ## Add stylesheet -Here, the theme is referred using CDN inside the `` of `~/Views/Shared/_Layout.cshtml` file as follows, +Here, the desired theme is referred using CDN inside the `` of **~/Views/Shared/_Layout.cshtml** file as follows, {% tabs %} {% highlight c# tabtitle="~/_Layout.cshtml" %} @@ -43,7 +43,7 @@ N> Checkout the [Themes topic](https://ej2.syncfusion.com/aspnetmvc/documentatio ## Add ASP.NET MVC Avatar control -Now, add the Syncfusion® ASP.NET MVC Avatar control in `~/Home/Index.cshtml` page. +Now, add the Syncfusion® ASP.NET MVC Avatar control in **~/Home/Index.cshtml** page. {% tabs %} {% highlight razor tabtitle="CSHTML" %} diff --git a/ej2-asp-core-mvc/avatar/EJ2_ASP.NETCORE/getting-started.md b/ej2-asp-core-mvc/avatar/EJ2_ASP.NETCORE/getting-started.md index 9ed1e73d7b..feb3186806 100644 --- a/ej2-asp-core-mvc/avatar/EJ2_ASP.NETCORE/getting-started.md +++ b/ej2-asp-core-mvc/avatar/EJ2_ASP.NETCORE/getting-started.md @@ -11,7 +11,7 @@ documentation: ug # Getting Started with ASP.NET Core Avatar Control -This section briefly explains about how to include [ASP.NET Core Avatar](https://www.syncfusion.com/aspnet-core-ui-controls/avatar) control in your ASP.NET Core application using Visual Studio. +This section explains about how to include [ASP.NET Core Avatar](https://www.syncfusion.com/aspnet-core-ui-controls/avatar) control in your ASP.NET Core application using Visual Studio. ## Prerequisites @@ -25,7 +25,7 @@ This section briefly explains about how to include [ASP.NET Core Avatar](https:/ ## Add stylesheet -Here, the theme is referred using CDN inside the `` of `~/Pages/Shared/_Layout.cshtml` file as follows, +Here, the desired theme is referred using CDN inside the `` of **~/Pages/Shared/_Layout.cshtml** file as follows, {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} @@ -43,7 +43,7 @@ N> Checkout the [Themes topic](https://ej2.syncfusion.com/aspnetcore/documentati ## Add ASP.NET Core Avatar control -Now, add the Syncfusion® ASP.NET Core Avatar tag helper in `~/Pages/Index.cshtml` page. +Now, add the Syncfusion® ASP.NET Core Avatar tag helper in **~/Pages/Index.cshtml** page. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} diff --git a/ej2-asp-core-mvc/avatar/how-to/avatar-customization.md b/ej2-asp-core-mvc/avatar/how-to/avatar-customization.md index 05b7121f83..ec607b3213 100644 --- a/ej2-asp-core-mvc/avatar/how-to/avatar-customization.md +++ b/ej2-asp-core-mvc/avatar/how-to/avatar-customization.md @@ -1,7 +1,7 @@ --- layout: post -title: Avatar Customization in ##Platform_Name## Avatar Component | Syncfusion -description: Learn here all about Avatar Customization in Syncfusion ##Platform_Name## Avatar component of Syncfusion Essential JS 2 and more. +title: Avatar Customization in ##Platform_Name## Avatar control | Syncfusion +description: Learn here all about Avatar Customization in Syncfusion ##Platform_Name## Avatar control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Avatar Customization publishingplatform: ##Platform_Name## @@ -12,7 +12,7 @@ documentation: ug ## Color customization -The avatar comes with default background color (Grey). This can be easily customized to desired color by adding custom class or directly selecting the avatar class from the CSS. +The Avatar comes with default background color (Grey). This can be easily customized to the desired color by adding custom class or directly selecting the Avatar class from the CSS. {% if page.publishingplatform == "aspnet-core" %} @@ -37,9 +37,9 @@ The avatar comes with default background color (Grey). This can be easily custom ![Avatar Color](../images/color.PNG) -## Customize avatar sizes +## Customize Avatar sizes -Even though the avatar comes with five predefined sizes, sometimes it's not enough. So, the avatar is designed in such a way that the width and height will be relative to font-size. By changing the `font-size` of the avatar element, you can change the width and height automatically. +Even though the Avatar comes with five predefined sizes, sometimes it's not enough. The Avatar is designed so that the width and height are relative to the font-size. By changing the `font-size` of the Avatar element, you can change the width and height automatically. {% if page.publishingplatform == "aspnet-core" %} @@ -66,9 +66,9 @@ Even though the avatar comes with five predefined sizes, sometimes it's not enou N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-Core-UG-Examples/tree/main/Avatar/AvatarUGSample). -## Use various media in avatar +## Use various media in Avatar -Avatars can be used with a wide variety of media formats like SVG, font-icons, images, letters, words, etc. +Avatars can be used with a wide variety of types of media formats like SVG, font-icons, images, letters, words, etc. {% if page.publishingplatform == "aspnet-core" %} diff --git a/ej2-asp-core-mvc/avatar/how-to/integrate-avatar-into-badge.md b/ej2-asp-core-mvc/avatar/how-to/integrate-avatar-into-badge.md index 350da13087..77795bb828 100644 --- a/ej2-asp-core-mvc/avatar/how-to/integrate-avatar-into-badge.md +++ b/ej2-asp-core-mvc/avatar/how-to/integrate-avatar-into-badge.md @@ -1,16 +1,16 @@ --- layout: post -title: Integrate Avatar Into Badge in ##Platform_Name## Avatar Component -description: Learn here all about how to integrate avatar into badge in Syncfusion ##Platform_Name## Avatar component of Syncfusion Essential JS 2 and more. +title: Integrate Avatar Into Badge in ##Platform_Name## Avatar control | Syncfusion +description: Learn here all about how to integrate Avatar into Badge in Syncfusion ##Platform_Name## Avatar control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Integrate Avatar Into Badge publishingplatform: ##Platform_Name## documentation: ug --- -# Integrate avatar into Badge +# Integrate Avatar into Badge -The badge is dependent and supportive component, and it can be used with avatar to create a notification avatar. The default avatar (.`e-avatar`) and circle avatar (.`e-avatar-circle`) have been used with notification badges (.`e-badge-notification`) in the following sample. +The Badge is a dependent and supportive control that can be used with Avatar to create a notification Avatar. The default Avatar `(.e-avatar)` and circle Avatar `(.e-avatar-circle)` have been used with notification badges `(.e-badge-notification)` in the following sample. {% if page.publishingplatform == "aspnet-core" %} diff --git a/ej2-asp-core-mvc/avatar/how-to/integrate-avatar-into-listview.md b/ej2-asp-core-mvc/avatar/how-to/integrate-avatar-into-listview.md index b4c994baaa..598540a5b1 100644 --- a/ej2-asp-core-mvc/avatar/how-to/integrate-avatar-into-listview.md +++ b/ej2-asp-core-mvc/avatar/how-to/integrate-avatar-into-listview.md @@ -1,16 +1,16 @@ --- layout: post -title: Integrate Avatar Into Listview in ##Platform_Name## Avatar Component -description: Learn here all about how to integrate avatar into Listview in Syncfusion ##Platform_Name## Avatar component of Syncfusion Essential JS 2 and more. +title: Integrate Avatar Into ListView in ##Platform_Name## Avatar control | Syncfusion +description: Learn here all about how to integrate Avatar into ListView in Syncfusion ##Platform_Name## Avatar control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc -control: Integrate Avatar Into Listview +control: Integrate Avatar Into ListView publishingplatform: ##Platform_Name## documentation: ug --- -# Integrate avatar into ListView +# Integrate Avatar into ListView -Avatar is integrated into the listview to create contacts applications. The `xsmall` size avatar is used to match the size of the list item. Letters and images are also used as avatar content. +Avatar is integrated into the ListView to create contacts applications. The `xsmall` size Avatar is used to match the size of the list items. Both letters and images are also used as Avatar content. {% if page.publishingplatform == "aspnet-core" %} diff --git a/ej2-asp-core-mvc/avatar/overview.md b/ej2-asp-core-mvc/avatar/overview.md index 54c959b31f..c24cee7707 100644 --- a/ej2-asp-core-mvc/avatar/overview.md +++ b/ej2-asp-core-mvc/avatar/overview.md @@ -1,7 +1,7 @@ --- layout: post -title: Overview in ##Platform_Name## Avatar Component -description: Learn here all about Overview in Syncfusion ##Platform_Name## Avatar component of Syncfusion Essential JS 2 and more. +title: Overview in ##Platform_Name## Avatar control | Syncfusion +description: Learn here all about Overview in Syncfusion ##Platform_Name## Avatar control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Index publishingplatform: ##Platform_Name## diff --git a/ej2-asp-core-mvc/avatar/types.md b/ej2-asp-core-mvc/avatar/types.md index 560bd3b1af..1244f7b778 100644 --- a/ej2-asp-core-mvc/avatar/types.md +++ b/ej2-asp-core-mvc/avatar/types.md @@ -11,19 +11,19 @@ documentation: ug # Types and Styles in ##Platform_Name## Avatar Control -This section explains different types of avatar. +This section explains different types of Avatar. ## Avatar size -The Essential® JS 2 Avatar has the following predefined sizes that can be used with the `.e-avatar` class to change the appearance of the avatar. +The Essential® JS 2 Avatar has the following predefined sizes that can be used with the `.e-avatar` class to change the appearance of the Avatar. | Class Name | Description | | ------------- | ------------- | -| e-avatar-xlarge | Displays xlarge size avatar. | -| e-avatar-large | Displays apply large size avatar. | -| e-avatar | Displays apply default size avatar. | -| e-avatar-small | Displays apply small size avatar. | -| e-avatar-xsmall | Displays apply xsmall size avatar. | +| e-avatar-xlarge | Displays xlarge size Avatar. | +| e-avatar-large | Displays apply large size Avatar. | +| e-avatar | Displays apply default size Avatar. | +| e-avatar-small | Displays apply small size Avatar. | +| e-avatar-xsmall | Displays apply xsmall size Avatar. | {% if page.publishingplatform == "aspnet-core" %} @@ -50,14 +50,14 @@ The Essential® JS 2 Avatar has the followin ## Avatar types -The types of Essential® JS 2 avatar are: +The types of Essential® JS 2 Avatar are: * Default * Circle ### Default -The default style of the avatar is rectangular shape with rounded corners, which can be applied from adding the modifier class `.e-avatar` to the target element. +The default style of the Avatar is rectangular shape with rounded corners, which can be applied from adding the modifier class `.e-avatar` to the target element. {% if page.publishingplatform == "aspnet-core" %} @@ -83,7 +83,7 @@ The default style of the avatar is rectangular shape with rounded corners, which ### Circle -The circle avatar style can be applied by adding the modifier class `.e-avatar-circle` to the target element. +The circle Avatar style can be applied by adding the modifier class `.e-avatar-circle` to the target element. {% if page.publishingplatform == "aspnet-core" %} diff --git a/ej2-asp-core-mvc/badge/EJ2_ASP.MVC/getting-started-asp-mvc.md b/ej2-asp-core-mvc/badge/EJ2_ASP.MVC/getting-started-asp-mvc.md index 7feecb8ed6..416496f9ee 100644 --- a/ej2-asp-core-mvc/badge/EJ2_ASP.MVC/getting-started-asp-mvc.md +++ b/ej2-asp-core-mvc/badge/EJ2_ASP.MVC/getting-started-asp-mvc.md @@ -25,7 +25,7 @@ This section briefly explains about how to include [ASP.NET MVC Badge](https://w ## Add stylesheet -Here, the theme is referred using CDN inside the `` of `~/Views/Shared/_Layout.cshtml` file as follows, +Here, the theme is referred using CDN inside the `` of **~/Views/Shared/_Layout.cshtml** file as follows, {% tabs %} {% highlight c# tabtitle="~/_Layout.cshtml" %} @@ -43,7 +43,7 @@ N> Checkout the [Themes topic](https://ej2.syncfusion.com/aspnetmvc/documentatio ## Add ASP.NET MVC Badge control -Now, add the Syncfusion® ASP.NET MVC Badge control in `~/Home/Index.cshtml` page. +Now, add the Syncfusion® ASP.NET MVC Badge control in **~/Home/Index.cshtml** page. {% tabs %} {% highlight razor tabtitle="CSHTML" %} diff --git a/ej2-asp-core-mvc/badge/EJ2_ASP.NETCORE/getting-started-asp-core.md b/ej2-asp-core-mvc/badge/EJ2_ASP.NETCORE/getting-started-asp-core.md index 939c579014..1a8178965d 100644 --- a/ej2-asp-core-mvc/badge/EJ2_ASP.NETCORE/getting-started-asp-core.md +++ b/ej2-asp-core-mvc/badge/EJ2_ASP.NETCORE/getting-started-asp-core.md @@ -25,7 +25,7 @@ This section briefly explains about how to include [ASP.NET Core Badge](https:// ## Add stylesheet -Here, the theme is referred using CDN inside the `` of `~/Pages/Shared/_Layout.cshtml` file as follows, +Here, the theme is referred using CDN inside the `` of **~/Pages/Shared/_Layout.cshtml** file as follows, {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} @@ -43,7 +43,7 @@ N> Checkout the [Themes topic](https://ej2.syncfusion.com/aspnetcore/documentati ## Add ASP.NET Core Badge Control -Now, add the Syncfusion® ASP.NET Core Badge tag helper in `~/Pages/Index.cshtml` page. +Now, add the Syncfusion® ASP.NET Core Badge tag helper in **~/Pages/Index.cshtml** page. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} diff --git a/ej2-asp-core-mvc/badge/how-to/badge-customization.md b/ej2-asp-core-mvc/badge/how-to/badge-customization.md index 83f853d4f2..64bfbcd3d2 100644 --- a/ej2-asp-core-mvc/badge/how-to/badge-customization.md +++ b/ej2-asp-core-mvc/badge/how-to/badge-customization.md @@ -1,7 +1,7 @@ --- layout: post -title: Badge Customization in ##Platform_Name## Badge Component -description: Learn here all about Badge Customization in Syncfusion ##Platform_Name## Badge component of Syncfusion Essential JS 2 and more. +title: Badge Customization in ##Platform_Name## Badge control | Syncfusion +description: Learn here all about Badge Customization in Syncfusion ##Platform_Name## Badge control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Badge Customization publishingplatform: ##Platform_Name## @@ -10,9 +10,9 @@ documentation: ug # Customization in ##Platform_Name## Badge Control -## Colour customization +## Color customization -Even though badges come with `8 predefined colors`, you can also customize the colour of the badge as desired. +Even though Badges come with `8 predefined colors`, you can also customize the color of the Badge as desired. {% if page.publishingplatform == "aspnet-core" %} @@ -37,9 +37,9 @@ Even though badges come with `8 predefined colors`, you can also customize the c ![Badge Color Customization](../images/colorcustom.PNG) -## Customize badge size +## Customize Badge size -Badges are designed to change its size based on the content. To change the size of a badge, adjust the `font size` of the badge. +Badges are designed to change its size based on the content. To change the size of a Badge, adjust the `font size` of the Badge. {% if page.publishingplatform == "aspnet-core" %} @@ -66,7 +66,7 @@ Badges are designed to change its size based on the content. To change the size ## Custom position -Even though the badges support the conventional `top` and `bottom` positions, the position of the badges can be changed as desired. This can be done by adding a custom class to the badge element to override the default position applied from the source. +Even though the Badges support the conventional `top` and `bottom` positions, the position of the Badges can be changed as desired. This can be done by adding a custom class to the Badge element to override the default position applied from the source. {% if page.publishingplatform == "aspnet-core" %} diff --git a/ej2-asp-core-mvc/badge/how-to/dynamic-badge-content.md b/ej2-asp-core-mvc/badge/how-to/dynamic-badge-content.md index 20d012ead4..2bb779af45 100644 --- a/ej2-asp-core-mvc/badge/how-to/dynamic-badge-content.md +++ b/ej2-asp-core-mvc/badge/how-to/dynamic-badge-content.md @@ -1,7 +1,7 @@ --- layout: post -title: Dynamic Badge Content in ##Platform_Name## Badge Component -description: Learn here all about Dynamic Badge Content in Syncfusion ##Platform_Name## Badge component of Syncfusion Essential JS 2 and more. +title: Dynamic Badge Content in ##Platform_Name## Badge control | Syncfusion +description: Learn here all about Dynamic Badge Content in Syncfusion ##Platform_Name## Badge control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Dynamic Badge Content publishingplatform: ##Platform_Name## @@ -10,7 +10,7 @@ documentation: ug # Dynamic Badge Content -Badges in real-time needs to be updated dynamically based on the requirements. The following sample demonstrates how to update the badges content dynamically. Click the increment button to change the badge value. +Badges in real-time needs to be updated dynamically based on the requirements. The following sample demonstrates how to update the Badges content dynamically. Click the increment button to change the Badge value. {% if page.publishingplatform == "aspnet-core" %} diff --git a/ej2-asp-core-mvc/badge/how-to/integrate-badge-into-listview.md b/ej2-asp-core-mvc/badge/how-to/integrate-badge-into-listview.md index 0867827c09..19e419a105 100644 --- a/ej2-asp-core-mvc/badge/how-to/integrate-badge-into-listview.md +++ b/ej2-asp-core-mvc/badge/how-to/integrate-badge-into-listview.md @@ -1,7 +1,7 @@ --- layout: post -title: Integrate Badge Into Listview in ##Platform_Name## Badge Component -description: Learn here all about how to integrate badge into Listview in Syncfusion ##Platform_Name## Badge component of Syncfusion Essential JS 2 and more. +title: Integrate Badge Into Listview in ##Platform_Name## Badge control | Syncfusion +description: Learn here all about how to integrate Badge into Listview in Syncfusion ##Platform_Name## Badge control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Integrate Badge Into Listview publishingplatform: ##Platform_Name## @@ -10,9 +10,9 @@ documentation: ug # Integrate Badge into ListView -The badges can be integrated with the `listview` component to indicate new notification with colour based on priority. +The Badges can be integrated with the `listview` control to indicate new notification with color based on priority. -In the following sample, `default` badges are used and there is no need to customize the badge size. The component will automatically adjust the size based on the container element. +In the following sample, `default` Badges are used and there is no need to customize the Badge size. The control will automatically adjust the size based on the container element. {% if page.publishingplatform == "aspnet-core" %} diff --git a/ej2-asp-core-mvc/badge/overview.md b/ej2-asp-core-mvc/badge/overview.md index 62e173f620..f997721cf9 100644 --- a/ej2-asp-core-mvc/badge/overview.md +++ b/ej2-asp-core-mvc/badge/overview.md @@ -1,7 +1,7 @@ --- layout: post -title: Overview in ##Platform_Name## Badge Component -description: Learn here all about Overview in Syncfusion ##Platform_Name## Badge component of Syncfusion Essential JS 2 and more. +title: Overview in ##Platform_Name## Badge control | Syncfusion +description: Learn here all about Overview in Syncfusion ##Platform_Name## Badge control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Index publishingplatform: ##Platform_Name## @@ -16,6 +16,6 @@ Badges can be used to alert users about new or unread messages, notifications, a * **[Types](/badge/types/)** - Provided 8 different types of Badges. -* **[Predefined Colours](/badge/types/#badge-styles)** - Provided 8 predefined situational colours of Badges. +* **[Predefined Colors](/badge/types/#badge-styles)** - Provided 8 predefined situational colors of Badges. * **[Position](/badge/types/#position)** - Supports 3 different positions, such as `default`, `top` and `bottom`. \ No newline at end of file diff --git a/ej2-asp-core-mvc/badge/types.md b/ej2-asp-core-mvc/badge/types.md index 8d25e600b7..b2b07f1d96 100644 --- a/ej2-asp-core-mvc/badge/types.md +++ b/ej2-asp-core-mvc/badge/types.md @@ -10,11 +10,11 @@ documentation: ug # Types in ##Platform_Name## Badge Control -This section explains different styles and types of the badges. +This section explains different styles and types of the Badges. ## Badge styles -The Essential® JS 2 Badge has the following predefined styles that can be used with `.e-badge` class to change the appearance of a badge. +The Essential® JS 2 Badge has the following predefined styles that can be used with `.e-badge` class to change the appearance of a Badge. | Class Name | Description | |------------|-------------| @@ -52,7 +52,7 @@ The Essential® JS 2 Badge has the following ## Badge types -The types of Essential® JS 2 badges are as follows: +The types of Essential® JS 2 Badges are as follows: * Circle * Pill @@ -64,7 +64,7 @@ The types of Essential® JS 2 badges are as ### Circle -The circle badge style can be applied by adding the modifier class `.e-badge-circle` to the target element. +The circle Badge style can be applied by adding the modifier class `.e-badge-circle` to the target element. {% if page.publishingplatform == "aspnet-core" %} @@ -91,7 +91,7 @@ The circle badge style can be applied by adding the modifier class `.e-badge-cir ### Pill -The pill badge style can be applied by adding the modifier class `.e-badge-pill` to the target element. +The pill Badge style can be applied by adding the modifier class `.e-badge-pill` to the target element. {% if page.publishingplatform == "aspnet-core" %} @@ -118,7 +118,7 @@ The pill badge style can be applied by adding the modifier class `.e-badge-pill` ### Link -When badge modifier classes are applied to the anchor tag, the badge’s appearance will change from normal state to hover state on mouseover. +When Badge modifier classes are applied to the anchor tag, the Badge’s appearance will change from normal state to hover state on mouseover. {% if page.publishingplatform == "aspnet-core" %} @@ -145,7 +145,7 @@ When badge modifier classes are applied to the anchor tag, the badge’s appeara ### Notification -The notification badge style can be applied by adding the modifier class `.e-badge-notification` to the target element. Notification badges are used when a content or a context needs special attention. While using the notification badge, set the parent element to `position: relative`. +The notification Badge style can be applied by adding the modifier class `.e-badge-notification` to the target element. Notification Badges are used when a content or a context needs special attention. While using the notification Badge, set the parent element to `position: relative`. {% if page.publishingplatform == "aspnet-core" %} @@ -172,7 +172,7 @@ The notification badge style can be applied by adding the modifier class `.e-bad ### Dot -Dot can be applied by adding the modifier class `.e-badge-dot` to the target element. Dot badges are similar to notification badges, but in a minimalistic way. While using the dot badge, set the parent element to `position: relative`. +Dot can be applied by adding the modifier class `.e-badge-dot` to the target element. Dot Badges are similar to notification Badges, but in a minimalistic way. While using the dot Badge, set the parent element to `position: relative`. {% if page.publishingplatform == "aspnet-core" %} @@ -199,7 +199,7 @@ Dot can be applied by adding the modifier class `.e-badge-dot` to the target ele ### Overlap -The overlap badge can be used with `notification` or `dot` badge, which overlaps with the target element by adding the modifier class`.e-badge-overlap`. While using the overlap badge, set the parent element to `position: relative`. +The overlap Badge can be used with `notification` or `dot` Badge, which overlaps with the target element by adding the modifier class`.e-badge-overlap`. While using the overlap Badge, set the parent element to `position: relative`. {% if page.publishingplatform == "aspnet-core" %} @@ -226,7 +226,7 @@ The overlap badge can be used with `notification` or `dot` badge, which overlaps ### Position -The default position of the `notification` or `dot` badge is top. But, the position can be changed to `bottom` using the modifier class `.e-badge-bottom`. For example, the bottom class modifier is used with dot badge to display the status in the avatar as shown in the following sample. +The default position of the `notification` or `dot` Badge is top. But, the position can be changed to `bottom` using the modifier class `.e-badge-bottom`. For example, the bottom class modifier is used with dot Badge to display the status in the avatar as shown in the following sample. {% if page.publishingplatform == "aspnet-core" %} diff --git a/ej2-asp-core-mvc/chips/EJ2_ASP.MVC/getting-started.md b/ej2-asp-core-mvc/chips/EJ2_ASP.MVC/getting-started.md index 15a6c5ed2a..71a7a1902b 100644 --- a/ej2-asp-core-mvc/chips/EJ2_ASP.MVC/getting-started.md +++ b/ej2-asp-core-mvc/chips/EJ2_ASP.MVC/getting-started.md @@ -8,9 +8,9 @@ publishingplatform: ##Platform_Name## documentation: ug --- -# Getting Started with ASP.NET MVC Chip Control +# Getting Started with ASP.NET MVC Chips Control -This section briefly explains about how to include [ASP.NET MVC Chip](https://www.syncfusion.com/aspnet-mvc-ui-controls/chips) control in your ASP.NET MVC application using Visual Studio. +This section briefly explains about how to include [ASP.NET MVC Chips](https://www.syncfusion.com/aspnet-mvc-ui-controls/chips) control in your ASP.NET MVC application using Visual Studio. ## Prerequisites @@ -38,7 +38,7 @@ N> Syncfusion® ASP.NET MVC controls are ava ## Add namespace -Add **Syncfusion.EJ2** namespace reference in `Web.config` under `Views` folder. +Add **Syncfusion.EJ2** namespace reference in `Web.config` under **Views** folder. ``` @@ -48,7 +48,7 @@ Add **Syncfusion.EJ2** namespace reference in `Web.config` under `Views` folder. ## Add stylesheet and script resources -Here, the theme and script is referred using CDN inside the `` of `~/Pages/Shared/_Layout.cshtml` file as follows, +Here, the theme and script is referred using CDN inside the `` of **~/Pages/Shared/_Layout.cshtml** file as follows, {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} @@ -68,7 +68,7 @@ N> Checkout the [Themes topic](https://ej2.syncfusion.com/aspnetmvc/documentatio ## Register Syncfusion® script manager -Also, register the script manager `EJS().ScriptManager()` at the end of `` in the `~/Pages/Shared/_Layout.cshtml` file as follows. +Also, register the script manager `EJS().ScriptManager()` at the end of `` in the **~/Pages/Shared/_Layout.cshtml** file as follows. {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} @@ -82,9 +82,9 @@ Also, register the script manager `EJS().ScriptManager()` at the end of `` {% endhighlight %} {% endtabs %} -## Add ASP.NET MVC Chip control +## Add ASP.NET MVC Chips control -Now, add the Syncfusion® ASP.NET MVC Chip control in `~/Home/Index.cshtml` page. +Now, add the Syncfusion® ASP.NET MVC Chips control in **~/Home/Index.cshtml** page. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -94,8 +94,8 @@ Now, add the Syncfusion® ASP.NET MVC Chip c {% endhighlight %} {% endtabs %} -Press Ctrl+F5 (Windows) or +F5 (macOS) to run the app. Then, the Syncfusion® ASP.NET MVC Chip control will be rendered in the default web browser. +Press Ctrl+F5 (Windows) or +F5 (macOS) to run the app. Then, the Syncfusion® ASP.NET MVC Chips control will be rendered in the default web browser. -![ASP.NET MVC Chip Control](images/chip.png) +![ASP.NET MVC Chips Control](images/chip.png) N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-MVC-Getting-Started-Examples/tree/main/Chip/ASP.NET%20MVC%20Razor%20Examples). diff --git a/ej2-asp-core-mvc/chips/EJ2_ASP.NETCORE/getting-started.md b/ej2-asp-core-mvc/chips/EJ2_ASP.NETCORE/getting-started.md index d2bf17b0b2..75c519aaed 100644 --- a/ej2-asp-core-mvc/chips/EJ2_ASP.NETCORE/getting-started.md +++ b/ej2-asp-core-mvc/chips/EJ2_ASP.NETCORE/getting-started.md @@ -1,6 +1,6 @@ --- layout: post -title: Getting Started with ##Platform_Name## Chips Control +title: Getting Started with ##Platform_Name## Chips Control | Syncfusion description: Checkout and learn about getting started with ##Platform_Name## Chips control of Syncfusion Essential JS 2 and more details. platform: ej2-asp-core-mvc control: Getting Started @@ -37,7 +37,8 @@ Install-Package Syncfusion.EJ2.AspNet.Core -Version {{ site.releaseversion }} N> Syncfusion® ASP.NET Core controls are available in [nuget.org.](https://www.nuget.org/packages?q=syncfusion.EJ2) Refer to [NuGet packages topic](https://ej2.syncfusion.com/aspnetcore/documentation/nuget-packages) to learn more about installing NuGet packages in various OS environments. The Syncfusion.EJ2.AspNet.Core NuGet package has dependencies, [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) for JSON serialization and [Syncfusion.Licensing](https://www.nuget.org/packages/Syncfusion.Licensing/) for validating Syncfusion® license key. ## Add Syncfusion® ASP.NET Core Tag Helper -Open `~/Pages/_ViewImports.cshtml` file and import the `Syncfusion.EJ2` TagHelper. + +Open **~/Pages/_ViewImports.cshtml** file and import the `Syncfusion.EJ2` TagHelper. {% tabs %} {% highlight C# tabtitle="~/_ViewImports.cshtml" %} @@ -49,7 +50,7 @@ Open `~/Pages/_ViewImports.cshtml` file and import the `Syncfusion.EJ2` TagHelpe ## Add stylesheet and script resources -Here, the theme and script is referred using CDN inside the `` of `~/Pages/Shared/_Layout.cshtml` file as follows, +Here, the theme and script are referred to using CDN inside the `` of **~/Pages/Shared/_Layout.cshtml** file as follows, {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} @@ -71,7 +72,7 @@ N> Checkout the [Adding Script Reference](https://ej2.syncfusion.com/aspnetcore/ ## Register Syncfusion® Script Manager -Also, register the script manager `` at the end of `` in the ASP.NET Core application as follows. +Also, register the script manager `` at the end of `` in the ASP.NET Core application as follows. {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} @@ -87,7 +88,7 @@ Also, register the script manager `` at the end of `` in the A ## Add ASP.NET Core Chips control -Now, add the Syncfusion® ASP.NET Core Chips tag helper in `~/Pages/Index.cshtml` page. +Now, add the Syncfusion® ASP.NET Core Chips tag helper in **~/Pages/Index.cshtml** page. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} diff --git a/ej2-asp-core-mvc/chips/accessibility.md b/ej2-asp-core-mvc/chips/accessibility.md index a9d2287c27..11cc9d63d5 100644 --- a/ej2-asp-core-mvc/chips/accessibility.md +++ b/ej2-asp-core-mvc/chips/accessibility.md @@ -12,12 +12,12 @@ documentation: ug ## Keyboard interaction -The following shortcut keys are used to access the Chip control without any interruption. +The following shortcut keys are used to access the Chips control without interruption. | Keyboard shortcuts | Actions | |------------|-------------------| -| Enter | Selects the targeted chip from the ChipList/ChipCollection. | -| Delete | Deletes the targeted chip from the ChipList/ChipCollection. | +| Enter | Selects the targeted Chips from the ChipList/ChipCollection. | +| Delete | Deletes the targeted Chips from the ChipList/ChipCollection. | {% if page.publishingplatform == "aspnet-core" %} diff --git a/ej2-asp-core-mvc/chips/customization.md b/ej2-asp-core-mvc/chips/customization.md index 90ea11bac3..d99858ff8e 100644 --- a/ej2-asp-core-mvc/chips/customization.md +++ b/ej2-asp-core-mvc/chips/customization.md @@ -8,23 +8,23 @@ publishingplatform: ##Platform_Name## documentation: ug --- -# Chip Customization in Chip Control +# Chips Customization in Chips Control -This section explains the customization of styles, leading icons, avatar, and trailing icons in Chip control. +This section explains the customization of styles, leading icons, avatars, and trailing icons in the Chips control. ## Styles -The Chip control has the following predefined styles that can be defined using the `cssClass` property. +{% if page.publishingplatform == "aspnet-core" %} + +The Chips control has the following predefined styles that can be defined using the [`cssClass`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.buttons.chiplist.html#Syncfusion_EJ2_Buttons_ChipList_CssClass) property. | Class | Description | | -------- | -------- | -| e-primary | Represents a primary chip. | -| e-success | Represents a positive chip. | -| e-info | Represents an informative chip. | -| e-warning | Represents a chip with caution. | -| e-danger | Represents a negative chip. | - -{% if page.publishingplatform == "aspnet-core" %} +| e-primary | Represents a primary Chips. | +| e-success | Represents a positive Chips. | +| e-info | Represents an informative Chips. | +| e-warning | Represents a Chips with caution. | +| e-danger | Represents a negative Chips. | {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -34,6 +34,16 @@ The Chip control has the following predefined styles that can be defined using t {% elsif page.publishingplatform == "aspnet-mvc" %} +The Chips control has the following predefined styles that can be defined using the [`cssClass`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_CssClass) property. + +| Class | Description | +| -------- | -------- | +| e-primary | Represents a primary Chips. | +| e-success | Represents a positive Chips. | +| e-info | Represents an informative Chips. | +| e-warning | Represents a Chips with caution. | +| e-danger | Represents a negative Chips. | + {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/chips/styles/razor %} @@ -44,14 +54,14 @@ The Chip control has the following predefined styles that can be defined using t {% endtabs %} {% endif %} - +![ASP.NET Styles Chips Control](images/styles.png) ## Leading Icon -You can add and customize the leading icon of chip using the `leadingIconCss` property. - {% if page.publishingplatform == "aspnet-core" %} +You can add and customize the leading icon of Chips using the [`leadingIconCss`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.buttons.chiplist.html#Syncfusion_EJ2_Buttons_ChipList_LeadingIconCss) property. + {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/chips/leadingIcon/tagHelper %} @@ -60,6 +70,8 @@ You can add and customize the leading icon of chip using the `leadingIconCss` pr {% elsif page.publishingplatform == "aspnet-mvc" %} +You can add and customize the leading icon of Chips using the [`leadingIconCss`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_LeadingIconCss) property. + {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/chips/leadingIcon/razor %} @@ -70,14 +82,14 @@ You can add and customize the leading icon of chip using the `leadingIconCss` pr {% endtabs %} {% endif %} - +![ASP.NET Leading Icon Chips Control](images/leading-icon.png) ## Avatar -You can add and customize the avatar of chip using the `avatarIconCss` property. - {% if page.publishingplatform == "aspnet-core" %} +You can add and customize the avatar of Chips using the [`avatarIconCss`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.buttons.chiplist.html#Syncfusion_EJ2_Buttons_ChipList_AvatarIconCss) property. + {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/chips/avatar/tagHelper %} @@ -86,6 +98,8 @@ You can add and customize the avatar of chip using the `avatarIconCss` property. {% elsif page.publishingplatform == "aspnet-mvc" %} +You can add and customize the avatar of Chips using the [`avatarIconCss`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_AvatarIconCss) property. + {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/chips/avatar/razor %} @@ -96,14 +110,14 @@ You can add and customize the avatar of chip using the `avatarIconCss` property. {% endtabs %} {% endif %} - +![ASP.NET Avatar Chips Control](images/avatar.png) ## Avatar Content -You can add and customize the avatar content of chip using the `avatarText` property. - {% if page.publishingplatform == "aspnet-core" %} +You can add and customize the avatar content of Chips using the [`avatarText`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.buttons.chiplist.html#Syncfusion_EJ2_Buttons_ChipList_AvatarText) property. + {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/chips/avatarText/tagHelper %} @@ -112,6 +126,8 @@ You can add and customize the avatar content of chip using the `avatarText` prop {% elsif page.publishingplatform == "aspnet-mvc" %} +You can add and customize the avatar content of Chips using the [`avatarText`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_AvatarText) property. + {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/chips/avatarText/razor %} @@ -122,14 +138,14 @@ You can add and customize the avatar content of chip using the `avatarText` prop {% endtabs %} {% endif %} - +![ASP.NET Avatar content Chips Control](images/avatar-content.png) ## Trailing Icon -You can add and customize the trailing icon of chip using the `trailingIconCss` property. - {% if page.publishingplatform == "aspnet-core" %} +You can add and customize the trailing icon of Chips using the [`trailingIconCss`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.buttons.chiplist.html#Syncfusion_EJ2_Buttons_ChipList_TrailingIconCss) property. + {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/chips/trailing/tagHelper %} @@ -138,6 +154,8 @@ You can add and customize the trailing icon of chip using the `trailingIconCss` {% elsif page.publishingplatform == "aspnet-mvc" %} +You can add and customize the trailing icon of Chips using the [`trailingIconCss`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_TrailingIconCss) property. + {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/chips/trailing/razor %} @@ -150,12 +168,12 @@ You can add and customize the trailing icon of chip using the `trailingIconCss` -## Outline Chip - -Outline chip has the border with the background transparent. It can be set using the `cssClass` property. +## Outline Chips {% if page.publishingplatform == "aspnet-core" %} +Outline Chips have a border with a transparent background. It can be set using the [`cssClass`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.buttons.chiplist.html#Syncfusion_EJ2_Buttons_ChipList_CssClass) property. + {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/chips/outline/tagHelper %} @@ -164,6 +182,8 @@ Outline chip has the border with the background transparent. It can be set using {% elsif page.publishingplatform == "aspnet-mvc" %} +Outline Chips have a border with a transparent background. It can be set using the [`cssClass`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_CssClass) property. + {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/chips/outline/razor %} @@ -174,11 +194,13 @@ Outline chip has the border with the background transparent. It can be set using {% endtabs %} {% endif %} +![ASP.NET Outline Chips Control](images/outline-chip.png) + ## Template {% if page.publishingplatform == "aspnet-core" %} -The [`Template`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.buttons.chiplist.html#Syncfusion_EJ2_Buttons_ChipList_Template) property of the Chips control allows users to fully customize the layout and design of each chip. By using the `Template` property, users can include custom HTML elements, such as links, icons, or additional content. +The [`Template`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.buttons.chiplist.html#Syncfusion_EJ2_Buttons_ChipList_Template) property of the Chips control allows users to fully customize the layout and design of each Chips. By using the `Template` property, users can include custom HTML elements such as links, icons, or additional content. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -188,7 +210,7 @@ The [`Template`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.bu {% elsif page.publishingplatform == "aspnet-mvc" %} -The [`Template`](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.buttons.chiplist.html#Syncfusion_EJ2_Buttons_ChipList_Template) property of the Chips control allows users to fully customize the layout and design of each chip. By using the `Template` property, users can include custom HTML elements, such as links, icons, or additional content. +The [`Template`](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.buttons.chiplist.html#Syncfusion_EJ2_Buttons_ChipList_Template) property of the Chips control allows users to fully customize the layout and design of each Chips. By using the `Template` property, users can include custom HTML elements such as links, icons, or additional content. {% tabs %} {% highlight razor tabtitle="CSHTML" %} @@ -200,5 +222,6 @@ The [`Template`](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.but {% endtabs %} {% endif %} +![ASP.NET template Chips Control](images/template.png) N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-Core-UG-Examples/tree/main/Chips/ChipsSample). diff --git a/ej2-asp-core-mvc/chips/images/action-chip.png b/ej2-asp-core-mvc/chips/images/action-chip.png new file mode 100644 index 0000000000..841b05dd19 Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/action-chip.png differ diff --git a/ej2-asp-core-mvc/chips/images/avatar-content.png b/ej2-asp-core-mvc/chips/images/avatar-content.png new file mode 100644 index 0000000000..497e32d832 Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/avatar-content.png differ diff --git a/ej2-asp-core-mvc/chips/images/avatar.png b/ej2-asp-core-mvc/chips/images/avatar.png new file mode 100644 index 0000000000..baa425d96a Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/avatar.png differ diff --git a/ej2-asp-core-mvc/chips/images/choice-chip.png b/ej2-asp-core-mvc/chips/images/choice-chip.png new file mode 100644 index 0000000000..01c898fb57 Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/choice-chip.png differ diff --git a/ej2-asp-core-mvc/chips/images/deletable-chip.png b/ej2-asp-core-mvc/chips/images/deletable-chip.png new file mode 100644 index 0000000000..5195133a06 Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/deletable-chip.png differ diff --git a/ej2-asp-core-mvc/chips/images/filter-chip.png b/ej2-asp-core-mvc/chips/images/filter-chip.png new file mode 100644 index 0000000000..52ba3cbf0d Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/filter-chip.png differ diff --git a/ej2-asp-core-mvc/chips/images/input-chip.png b/ej2-asp-core-mvc/chips/images/input-chip.png new file mode 100644 index 0000000000..2ea159893b Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/input-chip.png differ diff --git a/ej2-asp-core-mvc/chips/images/leading-icon.png b/ej2-asp-core-mvc/chips/images/leading-icon.png new file mode 100644 index 0000000000..baa425d96a Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/leading-icon.png differ diff --git a/ej2-asp-core-mvc/chips/images/outline-chip.png b/ej2-asp-core-mvc/chips/images/outline-chip.png new file mode 100644 index 0000000000..ad6e55bb43 Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/outline-chip.png differ diff --git a/ej2-asp-core-mvc/chips/images/styles.png b/ej2-asp-core-mvc/chips/images/styles.png new file mode 100644 index 0000000000..6be391b43f Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/styles.png differ diff --git a/ej2-asp-core-mvc/chips/images/template.png b/ej2-asp-core-mvc/chips/images/template.png new file mode 100644 index 0000000000..16cfcc8e62 Binary files /dev/null and b/ej2-asp-core-mvc/chips/images/template.png differ diff --git a/ej2-asp-core-mvc/chips/overview.md b/ej2-asp-core-mvc/chips/overview.md index 0d3c7faed1..1cafa8f974 100644 --- a/ej2-asp-core-mvc/chips/overview.md +++ b/ej2-asp-core-mvc/chips/overview.md @@ -1,7 +1,7 @@ --- layout: post -title: Overview in ##Platform_Name## Chips Component -description: Learn here all about Overview in Syncfusion ##Platform_Name## Chips component of Syncfusion Essential JS 2 and more. +title: Overview in ##Platform_Name## Chips Control | Syncfusion +description: Learn here all about Overview in Syncfusion ##Platform_Name## Chips control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Index publishingplatform: ##Platform_Name## @@ -10,4 +10,4 @@ documentation: ug # Overview -The chip is a small block of essential information that triggers an event on click action. It contains the text, image, or both and mostly used in contacts, mails, or filter tags. \ No newline at end of file +The Chips is a small block of essential information that triggers an event on click action. It contains the text, image, or both and mostly used in contacts, mails, or filter tags. \ No newline at end of file diff --git a/ej2-asp-core-mvc/chips/style.md b/ej2-asp-core-mvc/chips/style.md index 22811b438c..64f288e376 100644 --- a/ej2-asp-core-mvc/chips/style.md +++ b/ej2-asp-core-mvc/chips/style.md @@ -1,7 +1,7 @@ --- layout: post -title: Style in ##Platform_Name## Chips Component -description: Learn here all about Style in Syncfusion ##Platform_Name## Chips component of Syncfusion Essential JS 2 and more. +title: Style in ##Platform_Name## Chips Control | Syncfusion +description: Learn here all about Style in Syncfusion ##Platform_Name## Chips control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Style publishingplatform: ##Platform_Name## @@ -12,9 +12,9 @@ documentation: ug The following content provides the exact CSS structure that can be used to modify the control's appearance based on the user preference. -## Customizing the chip text +## Customizing the Chips text -Use the following CSS to customize the chip text properties. +Use the following CSS to customize the Chips text properties. ```css .e-chip .e-chip-text { @@ -24,9 +24,9 @@ Use the following CSS to customize the chip text properties. } ``` -## Customizing the chip icon +## Customizing the Chips icon -Use the following CSS to customize the chip icon properties. +Use the following CSS to customize the Chips icon properties. ```css .e-chip .e-icon { @@ -35,9 +35,9 @@ Use the following CSS to customize the chip icon properties. } ``` -## Customizing the chip delete button +## Customizing the Chips delete button -Use the following CSS to customize the chip delete button. +Use the following CSS to customize the Chips delete button. ```css .e-chip-list .e-chip .e-chip-delete.e-dlt-btn { @@ -46,9 +46,9 @@ Use the following CSS to customize the chip delete button. } ``` -## Customizing the chip outline +## Customizing the Chips outline -Use the following CSS to customize the chip outline. +Use the following CSS to customize the Chips outline. ```css .e-chip-list .e-chip.e-outline { @@ -57,27 +57,27 @@ Use the following CSS to customize the chip outline. } ``` -## Customizing the chip on selection +## Customizing the Chips on selection -Use the following CSS to customize the chip on selection. +Use the following CSS to customize the Chips on selection. ```css -/* To customize single chip on selection */ +/* To customize single Chips on selection */ .e-chip-list.e-selection .e-chip.e-active { background-color: #ffca1c; color: #e3165b; } -/* To customize multiple chip on selection */ +/* To customize multiple Chips on selection */ .e-chip-list .e-chip.e-active { background-color: #e3165b; color: white; } ``` -## Customizing the chip avatar text +## Customizing the Chips avatar text -Use the following CSS to customize the chip avatar text properties. +Use the following CSS to customize the Chips avatar text properties. ```css .e-chip-list .e-chip .e-chip-avatar { diff --git a/ej2-asp-core-mvc/chips/types.md b/ej2-asp-core-mvc/chips/types.md index 55bc0b6b57..e197086f37 100644 --- a/ej2-asp-core-mvc/chips/types.md +++ b/ej2-asp-core-mvc/chips/types.md @@ -12,14 +12,14 @@ documentation: ug The ChipList control has the following types. -* Input Chip -* Choice Chip -* Filter Chip -* Action Chip +* Input Chips +* Choice Chips +* Filter Chips +* Action Chips -## Input Chip +## Input Chips -Input Chip holds information in compact form. It converts user input into chips. +Input Chips holds information in compact form. It converts user input into Chips. {% if page.publishingplatform == "aspnet-core" %} @@ -41,14 +41,14 @@ Input Chip holds information in compact form. It converts user input into chips. {% endtabs %} {% endif %} +![ASP.NET Input Chips Control](images/input-chip.png) - -## Choice Chip - -Choice Chip allows to select a single chip from the set of ChipList/ChipCollection. It can be enabled by setting the `selection` property to `Single`. +## Choice Chips {% if page.publishingplatform == "aspnet-core" %} +Choice Chips allows to select a single Chips from the set of ChipList/ChipCollection. It can be enabled by setting the [`selection`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_Selection) property to `Single`. + {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/chips/choice/tagHelper %} @@ -57,6 +57,8 @@ Choice Chip allows to select a single chip from the set of ChipList/ChipCollecti {% elsif page.publishingplatform == "aspnet-mvc" %} +Choice Chips allows to select a single Chips from the set of ChipList/ChipCollection. It can be enabled by setting the [`selection`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_Selection) property to `Single`. + {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/chips/choice/razor %} @@ -67,14 +69,14 @@ Choice Chip allows to select a single chip from the set of ChipList/ChipCollecti {% endtabs %} {% endif %} +![ASP.NET Choice Chips Control](images/choice-chip.png) - -## Filter Chip - -Filter Chip allows to select a multiple chip from the set of ChipList/ChipCollection. It can be enabled by setting the `selection` property to `Multiple`. +## Filter Chips {% if page.publishingplatform == "aspnet-core" %} +Filter Chips allows to select a multiple Chips from the set of ChipList/ChipCollection. It can be enabled by setting the [`selection`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_Selection) property to `Multiple`. + {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/chips/filter/tagHelper %} @@ -83,6 +85,8 @@ Filter Chip allows to select a multiple chip from the set of ChipList/ChipCollec {% elsif page.publishingplatform == "aspnet-mvc" %} +Filter Chips allows to select a multiple Chips from the set of ChipList/ChipCollection. It can be enabled by setting the [`selection`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_Selection) property to `Multiple`. + {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/chips/filter/razor %} @@ -93,14 +97,14 @@ Filter Chip allows to select a multiple chip from the set of ChipList/ChipCollec {% endtabs %} {% endif %} +![ASP.NET Filter Chips Control](images/filter-chip.png) - -## Action Chip - -The Action Chip triggers the event like click or delete, which helps doing action based on the event. +## Action Chips {% if page.publishingplatform == "aspnet-core" %} +The Action Chips triggers the event like [`click`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_Click) or [`delete`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_Delete), which helps doing action based on the event. + {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/chips/action/tagHelper %} @@ -109,6 +113,8 @@ The Action Chip triggers the event like click or delete, which helps doing actio {% elsif page.publishingplatform == "aspnet-mvc" %} +The Action Chips triggers the event like [`click`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_Click) or [`delete`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_Delete), which helps doing action based on the event. + {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/chips/action/razor %} @@ -119,14 +125,14 @@ The Action Chip triggers the event like click or delete, which helps doing actio {% endtabs %} {% endif %} +![ASP.NET Actions Chips Control](images/action-chip.png) - -### Deletable Chip - -Deletable Chip allows to delete a chip from ChipList/ChipCollection. It can be enabled by setting the `enableDelete` property to `true`. +### Deletable Chips {% if page.publishingplatform == "aspnet-core" %} +Deletable Chips allows to delete a Chips from ChipList/ChipCollection. It can be enabled by setting the [`enableDelete`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_EnableDelete) property to `true`. + {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/chips/delete/tagHelper %} @@ -135,6 +141,8 @@ Deletable Chip allows to delete a chip from ChipList/ChipCollection. It can be e {% elsif page.publishingplatform == "aspnet-mvc" %} +Deletable Chips allows to delete a Chips from ChipList/ChipCollection. It can be enabled by setting the [`enableDelete`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.ChipList.html#Syncfusion_EJ2_Buttons_ChipList_EnableDelete) property to `true`. + {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/chips/delete/razor %} @@ -145,4 +153,6 @@ Deletable Chip allows to delete a chip from ChipList/ChipCollection. It can be e {% endtabs %} {% endif %} +![ASP.NET Deletable Chips Control](images/deletable-chip.png) + N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-Core-UG-Examples/tree/main/Chips/ChipsSample). \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/badge/razor b/ej2-asp-core-mvc/code-snippet/avatar/badge/razor index 66eda5b2d3..a6634c0c4e 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/badge/razor +++ b/ej2-asp-core-mvc/code-snippet/avatar/badge/razor @@ -6,7 +6,7 @@
- profile_pic + profile_pic
6 @@ -14,7 +14,7 @@
- profile_pic + profile_pic
12 @@ -22,7 +22,7 @@
- profile_pic + profile_pic
46 @@ -30,7 +30,7 @@
- profile_pic + profile_pic
82 @@ -38,7 +38,7 @@
- profile_pic + profile_pic
99+ @@ -54,7 +54,7 @@
- profile_pic + profile_pic
6 @@ -62,7 +62,7 @@
- profile_pic + profile_pic
12 @@ -70,7 +70,7 @@
- profile_pic + profile_pic
46 @@ -78,7 +78,7 @@
- profile_pic + profile_pic
82 @@ -86,7 +86,7 @@
- profile_pic + profile_pic
99+ @@ -97,82 +97,85 @@
+ \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/badge/tagHelper b/ej2-asp-core-mvc/code-snippet/avatar/badge/tagHelper index 39851fd999..a6634c0c4e 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/badge/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/avatar/badge/tagHelper @@ -6,7 +6,7 @@
- profile_pic + profile_pic
6 @@ -14,7 +14,7 @@
- profile_pic + profile_pic
12 @@ -22,7 +22,7 @@
- profile_pic + profile_pic
46 @@ -30,7 +30,7 @@
- profile_pic + profile_pic
82 @@ -38,7 +38,7 @@
- profile_pic + profile_pic
99+ @@ -54,7 +54,7 @@
- profile_pic + profile_pic
6 @@ -62,7 +62,7 @@
- profile_pic + profile_pic
12 @@ -70,7 +70,7 @@
- profile_pic + profile_pic
46 @@ -78,7 +78,7 @@
- profile_pic + profile_pic
82 @@ -86,7 +86,7 @@
- profile_pic + profile_pic
99+ @@ -97,83 +97,85 @@
+ \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/circle/razor b/ej2-asp-core-mvc/code-snippet/avatar/circle/razor index ad7a756f99..c7bde28a76 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/circle/razor +++ b/ej2-asp-core-mvc/code-snippet/avatar/circle/razor @@ -7,10 +7,10 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/circle/tagHelper b/ej2-asp-core-mvc/code-snippet/avatar/circle/tagHelper index ad7a756f99..c7bde28a76 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/circle/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/avatar/circle/tagHelper @@ -7,10 +7,10 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/color/razor b/ej2-asp-core-mvc/code-snippet/avatar/color/razor index 0414195d42..eaf8bd4b4f 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/color/razor +++ b/ej2-asp-core-mvc/code-snippet/avatar/color/razor @@ -7,35 +7,35 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/color/tagHelper b/ej2-asp-core-mvc/code-snippet/avatar/color/tagHelper index 0414195d42..eaf8bd4b4f 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/color/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/avatar/color/tagHelper @@ -7,35 +7,35 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/custom-size/razor b/ej2-asp-core-mvc/code-snippet/avatar/custom-size/razor index f39c31a424..96667a9080 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/custom-size/razor +++ b/ej2-asp-core-mvc/code-snippet/avatar/custom-size/razor @@ -7,30 +7,30 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/custom-size/tagHelper b/ej2-asp-core-mvc/code-snippet/avatar/custom-size/tagHelper index f39c31a424..96667a9080 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/custom-size/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/avatar/custom-size/tagHelper @@ -7,30 +7,30 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/default/razor b/ej2-asp-core-mvc/code-snippet/avatar/default/razor index 15f713e422..187a33a9c3 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/default/razor +++ b/ej2-asp-core-mvc/code-snippet/avatar/default/razor @@ -7,10 +7,10 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/default/tagHelper b/ej2-asp-core-mvc/code-snippet/avatar/default/tagHelper index 15f713e422..187a33a9c3 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/default/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/avatar/default/tagHelper @@ -7,10 +7,10 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/listview/razor b/ej2-asp-core-mvc/code-snippet/avatar/listview/razor index a035266b1b..d079eee680 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/listview/razor +++ b/ej2-asp-core-mvc/code-snippet/avatar/listview/razor @@ -1,119 +1,89 @@ -@using Syncfusion.EJ2 -
- -
- - @{ var template = "
" + - "${if(avatar!=='')}" + - "${avatar}" + - "${else}" + - " " + - "${/if}" + - "" + - "${text}
";} - @Html.EJS().ListView("letterAvatarList").Enable(true).DataSource((IEnumerable)ViewBag.dataSource).HeaderTitle("Contacts").ShowHeader(true).Template(template).SortOrder(Syncfusion.EJ2.Lists.SortOrder.Ascending).Render() - - - - - +@using Syncfusion.EJ2
< !-- Listview element -->@{ var template = "
" + + "${if(avatar!=='')}"+"${avatar}"+"${else}"+" "+"${/if}"+""+"${text}
"; +} + +@Html.EJS().ListView("letterAvatarList").Enable(true).DataSource((IEnumerable)ViewBag.dataSource).HeaderTitle("Contacts").ShowHeader(true).Template(template).SortOrder(Syncfusion.EJ2.Lists.SortOrder.Ascending).Render() \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/listview/tagHelper b/ej2-asp-core-mvc/code-snippet/avatar/listview/tagHelper index 3e3a134b88..020a9bdbc9 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/listview/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/avatar/listview/tagHelper @@ -1,14 +1,14 @@ -@{ - var template = "
" + - "${if(avatar!=='')}" + - "${avatar}" + - "${else}" + - " " + - "${/if}" + - "" + - "${text}
"; - - List data = new List(); +@{ + var template = "
" + + "${if(avatar!=='')}" + + "${avatar}" + + "${else}" + + " " + + "${/if}" + + "" + + "${text}
"; + + List data = new List < object > (); data.Add(new { text = "Robert", id = "s_01", avatar= "", pic= "pic04" }); data.Add(new { text = "Nancy", id = "s_02", avatar= "N", pic= "" }); data.Add(new { text = "John", id = "s_03", pic= "pic01", avatar= "" }); @@ -18,9 +18,10 @@ data.Add(new { text = "Margaret", id = "s_07", avatar= "M", pic= "" }); }
- - -
+ + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/media-formats/razor b/ej2-asp-core-mvc/code-snippet/avatar/media-formats/razor index 581e772b07..47002e2b74 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/media-formats/razor +++ b/ej2-asp-core-mvc/code-snippet/avatar/media-formats/razor @@ -85,119 +85,121 @@ \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/media-formats/tagHelper b/ej2-asp-core-mvc/code-snippet/avatar/media-formats/tagHelper index 39fdd4b39c..c4e4666749 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/media-formats/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/avatar/media-formats/tagHelper @@ -1,11 +1,4 @@ -@page -@model AvatarUGSample.Pages.VariousAvatarMediaModel - -@{ - -} - -
+
@@ -92,119 +85,121 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/size/razor b/ej2-asp-core-mvc/code-snippet/avatar/size/razor index 0d1514720c..5c393e0e3c 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/size/razor +++ b/ej2-asp-core-mvc/code-snippet/avatar/size/razor @@ -15,6 +15,7 @@ } .e-avatar { - background-image: url(./pic01.png); + background-image: url('@Url.Content("https://ej2.syncfusion.com/aspnetmvc/Content/avatar/images/pic01.png")'); + margin: 2px; } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/avatar/size/tagHelper b/ej2-asp-core-mvc/code-snippet/avatar/size/tagHelper index fddf9e54b7..3b652b7279 100644 --- a/ej2-asp-core-mvc/code-snippet/avatar/size/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/avatar/size/tagHelper @@ -15,6 +15,6 @@ } .e-avatar { - background-image: url(@Url.Content("~/css/avatar/images/pic01.png")); + background-image: url('@Url.Content("https://ej2.syncfusion.com/aspnetmvc/Content/avatar/images/pic01.png")'); } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/badge/position/tagHelper b/ej2-asp-core-mvc/code-snippet/badge/position/tagHelper index 2b3909d028..4eba5b92f2 100644 --- a/ej2-asp-core-mvc/code-snippet/badge/position/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/badge/position/tagHelper @@ -25,64 +25,65 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chips/avatar/razor b/ej2-asp-core-mvc/code-snippet/chips/avatar/razor index abd388f28f..ca067a0471 100644 --- a/ej2-asp-core-mvc/code-snippet/chips/avatar/razor +++ b/ej2-asp-core-mvc/code-snippet/chips/avatar/razor @@ -1,25 +1,24 @@ - @Html.EJS().ChipList("chip-avatar").Chips(chip => - { - chip.Text("Andrew").AvatarIconCss("andrew").Enabled(true).Add(); - chip.Text("Janet").AvatarIconCss("janet").Enabled(true).Add(); - chip.Text("Laura").AvatarIconCss("laura").Enabled(true).Add(); - chip.Text("Margaret").AvatarIconCss("margaret").Enabled(true).Add(); - }).Render() +@Html.EJS().ChipList("chip-avatar").Chips(chip => { + chip.Text("Andrew").AvatarIconCss("andrew").Enabled(true).Add(); + chip.Text("Janet").AvatarIconCss("janet").Enabled(true).Add(); + chip.Text("Laura").AvatarIconCss("laura").Enabled(true).Add(); + chip.Text("Margaret").AvatarIconCss("margaret").Enabled(true).Add(); +}).Render() \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chips/avatar/tagHelper b/ej2-asp-core-mvc/code-snippet/chips/avatar/tagHelper index 330006e873..07e20c6549 100644 --- a/ej2-asp-core-mvc/code-snippet/chips/avatar/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/chips/avatar/tagHelper @@ -1,26 +1,26 @@ - - - - - - + + + + + + \ No newline at end of file + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chips/choice/razor b/ej2-asp-core-mvc/code-snippet/chips/choice/razor index 5d825b44fd..09fa31d3e0 100644 --- a/ej2-asp-core-mvc/code-snippet/chips/choice/razor +++ b/ej2-asp-core-mvc/code-snippet/chips/choice/razor @@ -1,7 +1,7 @@ -@Html.EJS().ChipList("chip-avatar").Selection(Selection.Single).Chips(chip => - { - chip.Text("Small").Enabled(true).Add(); - chip.Text("Medium").Enabled(true).Add(); - chip.Text("Large").Enabled(true).Add(); - chip.Text("Extra Large").Enabled(true).Add(); - }).Render() \ No newline at end of file +@Html.EJS().ChipList("chip-avatar").Selection(Syncfusion.EJ2.Buttons.Selection.Single).Chips(chip => + { + chip.Text("Small").Enabled(true).Add(); + chip.Text("Medium").Enabled(true).Add(); + chip.Text("Large").Enabled(true).Add(); + chip.Text("Extra Large").Enabled(true).Add(); + }).Render() \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chips/filter/razor b/ej2-asp-core-mvc/code-snippet/chips/filter/razor index 07b2b70209..5f5cfa0e0e 100644 --- a/ej2-asp-core-mvc/code-snippet/chips/filter/razor +++ b/ej2-asp-core-mvc/code-snippet/chips/filter/razor @@ -1,4 +1,4 @@ -@Html.EJS().ChipList("chip-avatar").Selection(Selection.Multiple).Chips(chip => +@Html.EJS().ChipList("chip-avatar").Selection(Syncfusion.EJ2.Buttons.Selection.Multiple).Chips(chip => { chip.Text("Chai").Enabled(true).Add(); chip.Text("Chang").Enabled(true).Add(); diff --git a/ej2-asp-core-mvc/code-snippet/chips/leadingIcon/razor b/ej2-asp-core-mvc/code-snippet/chips/leadingIcon/razor index e579167ce9..38af6bf6a9 100644 --- a/ej2-asp-core-mvc/code-snippet/chips/leadingIcon/razor +++ b/ej2-asp-core-mvc/code-snippet/chips/leadingIcon/razor @@ -1,25 +1,25 @@ - @Html.EJS().ChipList("chip-avatar").Chips(chip => - { - chip.Text("Andrew").LeadingIconCss("andrew").Enabled(true).Add(); - chip.Text("Janet").LeadingIconCss("janet").Enabled(true).Add(); - chip.Text("Laura").LeadingIconCss("laura").Enabled(true).Add(); - chip.Text("Margaret").LeadingIconCss("margaret").Enabled(true).Add(); - }).Render() +@Html.EJS().ChipList("chip-avatar").Chips(chip => + { + chip.Text("Andrew").LeadingIconCss("andrew").Enabled(true).Add(); + chip.Text("Janet").LeadingIconCss("janet").Enabled(true).Add(); + chip.Text("Laura").LeadingIconCss("laura").Enabled(true).Add(); + chip.Text("Margaret").LeadingIconCss("margaret").Enabled(true).Add(); + }).Render() \ No newline at end of file +#chip-avatar .janet { +background-image: url('https://ej2.syncfusion.com/aspnetcore/css/chips/images/janet.png') +} + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chips/leadingIcon/tagHelper b/ej2-asp-core-mvc/code-snippet/chips/leadingIcon/tagHelper index 982cb91f0b..93d55450e3 100644 --- a/ej2-asp-core-mvc/code-snippet/chips/leadingIcon/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/chips/leadingIcon/tagHelper @@ -1,26 +1,26 @@ - - - - - - + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chips/outline/razor b/ej2-asp-core-mvc/code-snippet/chips/outline/razor index d882357125..8af3bb3fc7 100644 --- a/ej2-asp-core-mvc/code-snippet/chips/outline/razor +++ b/ej2-asp-core-mvc/code-snippet/chips/outline/razor @@ -1,5 +1,5 @@
-@Html.EJS().ChipList("chip-avatar").CssClass("e-outline").Chips(chip => +@Html.EJS().ChipList("chip-avatar1").CssClass("e-outline").Chips(chip => { chip.Text("Chai").Enabled(true).Add(); chip.Text("Chung").Enabled(true).Add(); @@ -7,7 +7,7 @@ chip.Text("Ikura").Enabled(true).Add(); }).Render() -@Html.EJS().ChipList("chip-avatar").CssClass("e-outline").EnableDelete(true).Chips(chip => +@Html.EJS().ChipList("chip-avatar2").CssClass("e-outline").EnableDelete(true).Chips(chip => { chip.Text("Andrew").Enabled(true).Add(); chip.Text("Janet").Enabled(true).Add(); diff --git a/ej2-asp-core-mvc/code-snippet/chips/outline/tagHelper b/ej2-asp-core-mvc/code-snippet/chips/outline/tagHelper index 877c5f1416..6871c273ec 100644 --- a/ej2-asp-core-mvc/code-snippet/chips/outline/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/chips/outline/tagHelper @@ -1,5 +1,5 @@
- + @@ -7,7 +7,7 @@ - + diff --git a/ej2-asp-core-mvc/code-snippet/chips/template/razor b/ej2-asp-core-mvc/code-snippet/chips/template/razor index 5e9ad068ef..69ccd1ff42 100644 --- a/ej2-asp-core-mvc/code-snippet/chips/template/razor +++ b/ej2-asp-core-mvc/code-snippet/chips/template/razor @@ -1,9 +1,24 @@ - @Html.EJS().ChipList("chip-avatar").Chips(chip => - { - chip.LeadingIconCss("trendingIcon").Template('#BreakingNews125k posts').Enabled(true).Add(); - chip.LeadingIconCss("cameraIcon").Template('#PhotoOfTheDay').Enabled(true).Add(); - chip.LeadingIconCss("trendingIcon").Template('#TechNews107k posts').Enabled(true).Add(); - }).Render() + +@Html.EJS().ChipList("chip-avatar").Chips(chip => +{ + chip.LeadingIconCss("trendingIcon").Template("#trendingNewsTemplate").Enabled(true).Add(); + chip.LeadingIconCss("cameraIcon").Template("#photoOfTheDayTemplate").Enabled(true).Add(); + chip.LeadingIconCss("trendingIcon").Template("#techNewsTemplate").Enabled(true).Add(); +}).Render() + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/cell-spacing/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/cell-spacing/CSHTML.cs new file mode 100644 index 0000000000..d89330ddc4 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/cell-spacing/CSHTML.cs @@ -0,0 +1,4 @@ +public class cellSpacingModel +{ + public double[] cellSpacing { get; set; } +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/cell-spacing/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/cell-spacing/tagHelper index 26cce8adb1..2ef6d5d1c7 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/cell-spacing/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/cell-spacing/tagHelper @@ -1,6 +1,13 @@ +@{ + ... + cellSpacingModel modelValue = new cellSpacingModel(); + modelValue.cellSpacing = new double[] { 20, 20 }; +} + +
- + diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/content-panel/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/content-panel/CSHTML.cs new file mode 100644 index 0000000000..bdf391e654 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/content-panel/CSHTML.cs @@ -0,0 +1,4 @@ + public class panelCellSpacingModel + { + public double[]? cellSpacing { get; set; } + } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/content-panel/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/content-panel/tagHelper index 4efb47ab6c..9b655bb943 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/content-panel/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/content-panel/tagHelper @@ -1,6 +1,13 @@ +@{ + ... + panelCellSpacingModel modelValue = new panelCellSpacingModel(); + modelValue.cellSpacing = new double[] { 10, 10 }; +} + +
- + diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/disable-dragging/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/disable-dragging/CSHTML.cs new file mode 100644 index 0000000000..85c1596770 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/disable-dragging/CSHTML.cs @@ -0,0 +1,4 @@ +public class ddCellSpacingModel +{ + public double[]? cellSpacing { get; set; } +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/disable-dragging/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/disable-dragging/tagHelper index 0f687c4818..e0bac3cf55 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/disable-dragging/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/disable-dragging/tagHelper @@ -1,7 +1,11 @@ -@model WebApplication.Controllers.HomeController.spacingModel +@{ + ... + ddCellSpacingModel modelValue = new ddCellSpacingModel(); + modelValue.cellSpacing = new double[] { 10, 10 }; +}
- + @@ -29,4 +33,4 @@ text-align: center; line-height: 90px; } - \ No newline at end of file + diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/drag-and-drop/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/drag-and-drop/CSHTML.cs new file mode 100644 index 0000000000..85c1596770 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/drag-and-drop/CSHTML.cs @@ -0,0 +1,4 @@ +public class ddCellSpacingModel +{ + public double[]? cellSpacing { get; set; } +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/drag-and-drop/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/drag-and-drop/tagHelper index d5e34c240b..83eff18eb3 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/drag-and-drop/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/drag-and-drop/tagHelper @@ -1,6 +1,13 @@ +@{ + ... + ddCellSpacingModel modelValue = new ddCellSpacingModel(); + modelValue.cellSpacing = new double[] { 10, 10 }; +} + +
- + @@ -21,18 +28,18 @@
\ No newline at end of file + diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/dragging-handler/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/dragging-handler/CSHTML.cs new file mode 100644 index 0000000000..e8949d6e67 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/dragging-handler/CSHTML.cs @@ -0,0 +1,21 @@ +public class componentSpacingModel +{ + public double[]? cellSpacing { get; set; } +} +public class ChartData +{ + public string? month; + public double sales; +} +public class LineData +{ + public double x; + public double y; +} + +public class PieData +{ + public string x; + public double y; + public string? text; +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/dragging-handler/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/dragging-handler/tagHelper index 8748005581..6e4e91b18d 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/dragging-handler/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/dragging-handler/tagHelper @@ -1,6 +1,48 @@ +@{ + ... + componentSpacingModel modelValue = new componentSpacingModel(); + modelValue.cellSpacing = new double[] { 10, 10 }; + + List chartData = new List + { + new ChartData { month = "Jan", sales = 35, }, + new ChartData { month = "Feb", sales = 28, }, + new ChartData { month = "Mar", sales = 34, }, + new ChartData { month = "Apr", sales = 32, }, + new ChartData { month = "May", sales = 40, }, + new ChartData { month = "Jun", sales = 32, }, + new ChartData { month = "Jul", sales = 35, }, + new ChartData { month = "Aug", sales = 55, }, + new ChartData { month = "Sep", sales = 38, }, + new ChartData { month = "Oct", sales = 30, }, + new ChartData { month = "Nov", sales = 25, }, + new ChartData { month = "Dec", sales = 32, } + }; + + List lineData = new List + { + new LineData { x = 2013, y = 28, }, + new LineData { x = 2014, y = 25, }, + new LineData { x = 2015, y = 26, }, + new LineData { x = 2016, y = 27, }, + new LineData { x = 2017, y = 32, }, + new LineData { x = 2018, y = 35, } + }; + + List pieData1 = new List + { + new PieData { x = "Chrome", y = 37, text = "37%", }, + new PieData { x = "UC Browser", y = 17, text = "17%", }, + new PieData { x = "iPhone", y = 19, text = "19%", }, + new PieData { x = "Others", y = 4, text = "4%", }, + new PieData { x = "Opera", y = 11, text = "11%", }, + new PieData { x = "Android", y = 12, text = "12%", } + }; +} +
- + @@ -17,7 +59,7 @@ - + @@ -29,7 +71,7 @@ - + @@ -43,7 +85,7 @@ - + diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/floating-panels/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/floating-panels/CSHTML.cs new file mode 100644 index 0000000000..611ee0f9fd --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/floating-panels/CSHTML.cs @@ -0,0 +1,5 @@ +public class floatingSpacingModel +{ + public double[]? cellSpacing { get; set; } +} + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/floating-panels/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/floating-panels/tagHelper index 819f2f22e8..5ba87fae1d 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/floating-panels/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/floating-panels/tagHelper @@ -1,11 +1,18 @@ + +@{ + .... + floatingSpacingModel modelValue = new floatingSpacingModel(); + modelValue.cellSpacing = new double[] { 10, 10 }; +} +
- +
- + diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/graphical-representation/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/graphical-representation/CSHTML.cs new file mode 100644 index 0000000000..d89330ddc4 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/graphical-representation/CSHTML.cs @@ -0,0 +1,4 @@ +public class cellSpacingModel +{ + public double[] cellSpacing { get; set; } +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/graphical-representation/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/graphical-representation/tagHelper index 5430e4586c..f97ed74bf0 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/graphical-representation/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/graphical-representation/tagHelper @@ -1,6 +1,13 @@ +@{ + ... + cellSpacingModel modelValue = new cellSpacingModel(); + modelValue.cellSpacing = new double[] { 10, 10 }; +} + +
- + diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/modifying-cell-size/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/modifying-cell-size/CSHTML.cs new file mode 100644 index 0000000000..432efe815c --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/modifying-cell-size/CSHTML.cs @@ -0,0 +1,5 @@ +public class cellSpacingModel +{ + public double[] cellSpacing { get; set; } + public double aspectRatio { get; set; } +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/modifying-cell-size/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/modifying-cell-size/tagHelper index 2d9d77c3f7..6c7b82ef6b 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/modifying-cell-size/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/modifying-cell-size/tagHelper @@ -1,6 +1,14 @@ +@{ + ... + cellSpacingModel modelValue = new cellSpacingModel(); + modelValue.cellSpacing = new double[] { 10, 10 }; + modelValue.aspectRatio = 100 / 50; +} + +
- + diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/moving/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/moving/CSHTML.cs new file mode 100644 index 0000000000..85c1596770 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/moving/CSHTML.cs @@ -0,0 +1,4 @@ +public class ddCellSpacingModel +{ + public double[]? cellSpacing { get; set; } +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/moving/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/moving/tagHelper index 4999ab9b29..98d8d5b494 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/moving/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/moving/tagHelper @@ -1,7 +1,11 @@ -@model WebApplication.Controllers.HomeController.spacingModel +@{ + ... + ddCellSpacingModel modelValue = new ddCellSpacingModel(); + modelValue.cellSpacing = new double[] { 10, 10 }; +}
- + @@ -21,14 +25,14 @@
\ No newline at end of file + diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-position/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-position/CSHTML.cs new file mode 100644 index 0000000000..85216ca578 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-position/CSHTML.cs @@ -0,0 +1,4 @@ +public class panelCellSpacingModel +{ + public double[]? cellSpacing { get; set; } +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-position/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-position/tagHelper index 2d60e2cace..86682d5f18 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-position/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-position/tagHelper @@ -1,6 +1,13 @@ +@{ + .. + panelCellSpacingModel modelValue = new panelCellSpacingModel(); + modelValue.cellSpacing = new double[] { 20, 20 }; +} + +
- + diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-size/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-size/CSHTML.cs new file mode 100644 index 0000000000..85216ca578 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-size/CSHTML.cs @@ -0,0 +1,4 @@ +public class panelCellSpacingModel +{ + public double[]? cellSpacing { get; set; } +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-size/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-size/tagHelper index 8972fe9c3c..2c8f1fc015 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-size/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/panel-size/tagHelper @@ -1,6 +1,13 @@ +@{ + ... + panelCellSpacingModel modelValue = new panelCellSpacingModel(); + modelValue.cellSpacing = new double[] { 20, 20 }; +} + +
- + @@ -30,4 +37,4 @@ text-align: center; line-height: 90px; } - + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/placing-content/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/placing-content/CSHTML.cs new file mode 100644 index 0000000000..e8949d6e67 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/placing-content/CSHTML.cs @@ -0,0 +1,21 @@ +public class componentSpacingModel +{ + public double[]? cellSpacing { get; set; } +} +public class ChartData +{ + public string? month; + public double sales; +} +public class LineData +{ + public double x; + public double y; +} + +public class PieData +{ + public string x; + public double y; + public string? text; +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/placing-content/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/placing-content/tagHelper index 736e9fbf24..f75f9a68c2 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/placing-content/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/placing-content/tagHelper @@ -1,6 +1,49 @@ +@{ + ... + componentSpacingModel modelValue = new componentSpacingModel(); + modelValue.cellSpacing = new double[] { 10, 10 }; + + List chartData = new List + { + new ChartData { month = "Jan", sales = 35, }, + new ChartData { month = "Feb", sales = 28, }, + new ChartData { month = "Mar", sales = 34, }, + new ChartData { month = "Apr", sales = 32, }, + new ChartData { month = "May", sales = 40, }, + new ChartData { month = "Jun", sales = 32, }, + new ChartData { month = "Jul", sales = 35, }, + new ChartData { month = "Aug", sales = 55, }, + new ChartData { month = "Sep", sales = 38, }, + new ChartData { month = "Oct", sales = 30, }, + new ChartData { month = "Nov", sales = 25, }, + new ChartData { month = "Dec", sales = 32, } + }; + + List lineData = new List + { + new LineData { x = 2013, y = 28, }, + new LineData { x = 2014, y = 25, }, + new LineData { x = 2015, y = 26, }, + new LineData { x = 2016, y = 27, }, + new LineData { x = 2017, y = 32, }, + new LineData { x = 2018, y = 35, } + }; + + List pieData1 = new List + { + new PieData { x = "Chrome", y = 37, text = "37%", }, + new PieData { x = "UC Browser", y = 17, text = "17%", }, + new PieData { x = "iPhone", y = 19, text = "19%", }, + new PieData { x = "Others", y = 4, text = "4%", }, + new PieData { x = "Opera", y = 11, text = "11%", }, + new PieData { x = "Android", y = 12, text = "12%", } + }; +} + +
- + @@ -12,15 +55,15 @@
- - - - - - - - - + + + + + + + + +
@@ -36,19 +79,19 @@
- - - - - - - - - - - - - + + + + + + + + + + + + +
@@ -64,15 +107,15 @@
- - - - - - - - - + + + + + + + + +
@@ -129,9 +172,9 @@ height: 30px } - .e-dashboard-layout.e-control .e-panel .e-panel-header div { - text-align: center; - } + .e-dashboard-layout.e-control .e-panel .e-panel-header div { + text-align: center; + } .header { padding: 5px; diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/resize-panel/CSHTML.cs b/ej2-asp-core-mvc/code-snippet/dashboard-layout/resize-panel/CSHTML.cs new file mode 100644 index 0000000000..85c1596770 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/resize-panel/CSHTML.cs @@ -0,0 +1,4 @@ +public class ddCellSpacingModel +{ + public double[]? cellSpacing { get; set; } +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/dashboard-layout/resize-panel/tagHelper b/ej2-asp-core-mvc/code-snippet/dashboard-layout/resize-panel/tagHelper index ebc50986f9..982df4bb71 100644 --- a/ej2-asp-core-mvc/code-snippet/dashboard-layout/resize-panel/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/dashboard-layout/resize-panel/tagHelper @@ -1,7 +1,11 @@ -@model WebApplication.Controllers.HomeController.spacingModel +@{ + ... + ddCellSpacingModel modelValue = new ddCellSpacingModel(); + modelValue.cellSpacing = new double[] { 10, 10 }; +}
- + @@ -21,12 +25,12 @@
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/custombutton/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/custombutton/tagHelper index 897d79fc5e..7c35424522 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/custombutton/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/custombutton/tagHelper @@ -1,25 +1,42 @@ - + - - - - - - + + + + + + + - + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/customcommand.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/customcommand.cs index 44e8d7f53a..bf01da4519 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/customcommand.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/customcommand.cs @@ -1,8 +1,7 @@ - public IActionResult Index() - { - var orders = OrdersDetails.GetAllRecords(); - ViewBag.DataSource = orders; - return View(); - } +public IActionResult Index() +{ + ViewBag.DataSource = OrdersDetails.GetAllRecords(); + return View(); +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/razor index 98a1501eba..1303ee39d0 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/razor +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/razor @@ -1,22 +1,38 @@ @{ List commands = new List(); - commands.Add(new { type = "userstatus", buttonOption = new { content = "Details", cssClass = "e-flat" } }); + commands.Add(new { buttonOption = new { content = "Details", cssClass = "e-flat" } }); } -@Html.EJS().Grid("CustomCommand").DataSource((IEnumerable)ViewBag.DataSource).Columns(col => +
+@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => { col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); col.Field("Freight").HeaderText("Freight").Width("120").EditType("numericedit").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("ShipName").HeaderText("Ship Name").Width("150").Add(); col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").Add(); col.HeaderText("Commands").Width("160").Commands(commands).Add(); - -}).AllowPaging().CommandClick("commandClick").EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true); }).Render() - +}).CommandClick("commandClick").Render(); diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/tagHelper index 10535c80de..9b0bfdb60f 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/customcommand/tagHelper @@ -1,21 +1,38 @@ @{ List commands = new List(); - commands.Add(new { type = "userstatus", buttonOption = new { content = "Details", cssClass = "e-flat e-details" } }); // custom + commands.Add(new { buttonOption = new { content = "Details", cssClass = "e-flat" } }); } - -
- - +
+ - - - + + + + + -
- diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/dialog.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/dialog.cs index 77d8fe70cf..686c81f8f8 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/dialog.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/dialog.cs @@ -1,6 +1,5 @@ public IActionResult Index() { - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; + ViewBag.DataSource = OrderDetails.GetAllRecords(); return View(); } diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/razor index 8de6e388c3..2ab1cb5d0e 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/razor +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/razor @@ -1,34 +1,27 @@ -@using Syncfusion.EJ2 - -@section ControlsSection{ -
- @Html.EJS().Grid("DialogTemplateEdit").DataSource((IEnumerable)ViewBag.dataSource).ActionComplete("actionComplete").Columns(col => - { - col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = true }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").ValidationRules(new { required = true, minLength = 3 }).Add(); - col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").Add(); - }).AllowPaging().PageSettings(page => page.PageCount(2)).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() - - - -} + }); + function actionComplete(args) { + if ((args.requestType === 'beginEdit' || args.requestType === 'add')) { + var dialog = args.dialog; + dialog.showCloseIcon = false; + dialog.height = 360; + dialog.width = 300; + dialog.header = args.requestType === 'beginEdit' ? 'Edit Record of ' + args.rowData['CustomerID'] : 'New Customer'; + } + } + + diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/tagHelper index c4fa6c3d34..ddef9c0d04 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/customizedialog/tagHelper @@ -1,17 +1,14 @@ - + - - - - + + + + - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/customvalidation/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/customvalidation/razor deleted file mode 100644 index 8f03235139..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/customvalidation/razor +++ /dev/null @@ -1,22 +0,0 @@ - -@Html.EJS().Grid("CustomValid").DataSource((IEnumerable)ViewBag.DataSource).Columns(col => -{ - col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); - col.Field("Freight").HeaderText("Freight").Width("120").EditType("numericedit").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("ShipName").HeaderText("Ship Name").Width("150").Add(); - col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").Add(); - -}).AllowPaging().EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true); }).Load("load").Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/customvalidation/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/customvalidation/tagHelper deleted file mode 100644 index f5a43cca1c..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/customvalidation/tagHelper +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/dialog.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/dialog.cs index f6f0126ac7..4019df2042 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/dialog.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/dialog.cs @@ -1,6 +1,5 @@ public IActionResult Index() { - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; + ViewBag.DataSource = OrderDetails.GetAllRecords(); return View(); } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/razor index 71eb2c9d7e..6561b5e764 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/razor +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/razor @@ -1,9 +1,8 @@ -@Html.EJS().Grid("DialogEdit").DataSource((IEnumerable)ViewBag.DataSource).Columns(col => +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => { col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = "true"}).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").ValidationRules(new { required = "true", minLength=3 }).Add(); - col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("ShipName").HeaderText("Ship Name").Width("150").Add(); - col.Field("ShipCountry").HeaderText("Ship Country").Width("150").Add(); - -}).AllowPaging().PageSettings(page => page.PageCount(2)).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() + col.Field("CustomerID").HeaderText("Customer Name").Width("150").ValidationRules(new { required = "true" }).Add(); + col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").EditType("numericedit").ValidationRules(new { required = "true",min=1, max=1000 }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("ShipName").HeaderText("Ship Name").Width("150").ValidationRules(new { required = "true" }).Add(); + col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").ValidationRules(new { required = "true" }).Width("150").Add(); +}).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/tagHelper index 6ce4d99f84..ee242e9ce8 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialog/tagHelper @@ -1,9 +1,10 @@ - + - - - + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/addpatial.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/addpatial.cs index b79cd9bab7..75e7dc7111 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/addpatial.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/addpatial.cs @@ -1,8 +1,4 @@ -@model TestApplication.Models.OrdersDetails -@*//define the model for store the model values*@ - -@using Syncfusion.EJ2 - +@model Grid_Columns.Pages.DialogTemplateModel
@@ -20,7 +16,6 @@ @using Syncfusion.EJ2
-
@@ -29,13 +24,11 @@ @using Syncfusion.EJ2
-
-
@@ -53,5 +46,4 @@ @using Syncfusion.EJ2
- \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/addpatialMVC.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/addpatialMVC.cs index ec8150b39f..7c9bbff6cd 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/addpatialMVC.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/addpatialMVC.cs @@ -1,9 +1,4 @@ -@model MVCApplication.Models.OrdersDetails -@*//define the model for store the model values*@ - -@using Syncfusion.EJ2 -@using Syncfusion.EJ2.DropDowns - +@using Syncfusion.EJ2;
@@ -21,34 +16,30 @@ @using Syncfusion.EJ2.DropDowns
-
- @Html.EJS().NumericTextBox("Freight").Format("C2").Placeholder("Freight").Render() + @Html.EJS().NumericTextBox("Freight").Format("C2").Placeholder("Freight").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Always).Render()
- @Html.EJS().DatePicker("OrderDate").Placeholder("Order Date").Render() + @Html.EJS().DatePicker("OrderDate").Placeholder("Order Date").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Always).Render()
-
- @Html.EJS().DropDownList("ShipCountry").DataSource(ViewBag.dataSource).Placeholder("Ship Country").Fields(new DropDownListFieldSettings { Text = "ShipCountry", Value = "ShipCountry" }).Render() - + @Html.EJS().DropDownList("ShipCountry").DataSource(ViewBag.dataSource).Placeholder("Ship Country").Fields(new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings { Text = "ShipCountry", Value = "ShipCountry" }).FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Always).Render()
- @Html.EJS().DropDownList("ShipCity").DataSource(ViewBag.dataSource).Placeholder("Ship City").Fields(new DropDownListFieldSettings { Text = "ShipCity", Value = "ShipCity" }).Render() + @Html.EJS().DropDownList("ShipCity").DataSource(ViewBag.dataSource).Placeholder("Ship City").Fields(new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings { Text = "ShipCity", Value = "ShipCity" }).FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Always).Render()
- + @Html.TextArea("ShipAddress")
- @Html.EJS().ScriptManager() \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialog.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialog.cs index 56866e749c..a3f8141fba 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialog.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialog.cs @@ -1,20 +1,17 @@ public IActionResult Index() { - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; + ViewBag.DataSource =OrderDetails.GetAllRecords(); return View(); } public ActionResult Editpartial(DialogTemplateModel value) { - var order = OrdersDetails.GetAllRecords(); - ViewBag.datasource = order; - return PartialView("Editpartial", value); + ViewBag.datasource = OrdersDetails.GetAllRecords(); + return PartialView("EditPartial", value); } public ActionResult AddPartial() { - var order = OrdersDetails.GetAllRecords(); - ViewBag.datasource = order; - return PartialView("Addpartial"); + ViewBag.datasource = OrdersDetails.GetAllRecords(); + return PartialView("AddPartial"); } diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialogData.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialogData.cs new file mode 100644 index 0000000000..e15bd23154 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialogData.cs @@ -0,0 +1,36 @@ + +public IActionResult Index() +{ + ViewBag.DataSource =OrderDetails.GetAllRecords(); + return View(); +} +public ActionResult OnPostEditPartial([FromBody] CRUDAction value) +{ + ViewData["DataSource"] = OrdersDetails.GetAllRecords(); + return new PartialViewResult + { + ViewName = "_EditPartial", + ViewData = new ViewDataDictionary(ViewData, value.value) + }; +} +public ActionResult OnPostAddPartial() +{ + ViewData["DataSource"] = OrdersDetails.GetAllRecords(); + return new PartialViewResult + { + ViewName = "_AddPartial" + }; +} +public class CRUDAction where T : class +{ + public string? action { get; set; } + public string? table { get; set; } + public string? keyColumn { get; set; } + public object? key { get; set; } + public T? value { get; set; } + public List? added { get; set; } + public List? changed { get; set; } + public List? deleted { get; set; } + public IDictionary @params { get; set; } + +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialogtemplatemodel.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialogtemplatemodel.cs index 9121ff79d0..ed0c8784ab 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialogtemplatemodel.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/dialogtemplatemodel.cs @@ -1,28 +1,17 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Web; - -namespace EJ2MVCSampleBrowser.Models +public class DialogTemplateModel { - public class DialogTemplateModel - { - [Required] - public int? OrderID { get; set; } - [Required, MinLength(3)] - public string CustomerID { get; set; } - public int? EmployeeID { get; set; } - public double Freight { get; set; } - public string ShipCity { get; set; } - public bool Verified { get; set; } - public DateTime OrderDate { get; set; } - - public string ShipName { get; set; } - - public string ShipCountry { get; set; } - - public DateTime ShippedDate { get; set; } - public string ShipAddress { get; set; } - } + [Required] + public int? OrderID { get; set; } + [Required, MinLength(3)] + public string CustomerID { get; set; } + public int? EmployeeID { get; set; } + public double Freight { get; set; } + public string ShipCity { get; set; } + public bool Verified { get; set; } + public DateTime OrderDate { get; set; } + public string ShipName { get; set; } + public string ShipCountry { get; set; } + public DateTime ShippedDate { get; set; } + public string ShipAddress { get; set; } } + diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/editpartial.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/editpartial.cs index 6f144e65f5..aa0bbb2a3f 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/editpartial.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/editpartial.cs @@ -1,8 +1,4 @@ -@model TestApplication.Models.OrdersDetails -@*//define the model for store the model values*@ - -@using Syncfusion.EJ2 - +@model Grid_Columns.Pages.DialogTemplateModel
@@ -20,7 +16,6 @@ @using Syncfusion.EJ2
-
@@ -29,16 +24,15 @@ @using Syncfusion.EJ2
-
- +
- +
@@ -53,5 +47,4 @@ @using Syncfusion.EJ2
- \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/editpartialMVC.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/editpartialMVC.cs index 88519b6048..110e4872d7 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/editpartialMVC.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/editpartialMVC.cs @@ -1,9 +1,4 @@ -@model MVCApplication.Models.OrdersDetails -@*//define the model for store the model values*@ - -@using Syncfusion.EJ2 -@using Syncfusion.EJ2.DropDowns - +@using Syncfusion.EJ2;
@@ -21,33 +16,30 @@ @using Syncfusion.EJ2.DropDowns
-
- @Html.EJS().NumericTextBox("Freight").Value(Model.Freight).Format("C2").Placeholder("Freight").Render() + @Html.EJS().NumericTextBox("Freight").Value(Model.Freight).Format("C2").Placeholder("Freight").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Always).Render()
- @Html.EJS().DatePicker("OrderDate").Value(Model.OrderDate).Placeholder("Order Date").Render() + @Html.EJS().DatePicker("OrderDate").Value(Model.OrderDate).Placeholder("Order Date").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Always).Render()
-
- @Html.EJS().DropDownList("ShipCountry").DataSource(ViewBag.dataSource).Value(Model.ShipCountry).Placeholder("Ship Country").Fields(new DropDownListFieldSettings { Text = "ShipCountry", Value = "ShipCountry" }).Render() + @Html.EJS().DropDownList("ShipCountry").DataSource(ViewBag.dataSource).Value(Model.ShipCountry).Placeholder("Ship Country").Fields(new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings { Text = "ShipCountry", Value = "ShipCountry" }).FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Always).Render()
- @Html.EJS().DropDownList("ShipCity").DataSource(ViewBag.dataSource).Value(Model.ShipCity).Placeholder("Ship City").Fields(new DropDownListFieldSettings { Text = "ShipCity", Value = "ShipCity" }).Render() + @Html.EJS().DropDownList("ShipCity").DataSource(ViewBag.dataSource).Value(Model.ShipCity).Placeholder("Ship City").Fields(new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings { Text = "ShipCity", Value = "ShipCity" }).FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Always).Render()
- + @Html.TextArea("ShipAddress")
- @Html.EJS().ScriptManager() \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/razor index 31dd5dbda7..af0832262e 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/razor +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/razor @@ -1,46 +1,57 @@ -@Html.EJS().Grid("DialogTemplateEdit").DataSource((IEnumerable)ViewBag.DataSource).ActionComplete("actionComplete").Columns(col => +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).ActionComplete("actionComplete").Height("348px").Columns(col => { col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = "true" }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); - col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").Add(); - -}).AllowPaging().PageSettings(page => page.PageCount(2)).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog).Template("#dialogtemplate"); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() - - + col.Field("ShipCountry").HeaderText("Ship Country").Width("150").Add(); +}).AllowPaging().EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog).Template("#dialogtemplate"); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() - - + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/tagHelper index 74265846c5..635a1be3c6 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/dialogtemplate/tagHelper @@ -1,57 +1,61 @@ -@{ - ViewData["Title"] = "DialogTemplate"; -} - -
- - - - - - - - - -
- +@Html.AntiForgeryToken() + + + + + + + + - - + diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/edit-upload/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/edit-upload/razor new file mode 100644 index 0000000000..1f221347ac --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/edit-upload/razor @@ -0,0 +1,69 @@ +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => +{ + col.Field("EmployeeID").HeaderText("Employee ID").IsPrimaryKey(true).Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).ValidationRules(new { required = "true" }).Add(); + col.Field("FirstName").HeaderText("First Name").ValidationRules(new { required = true }).Width("120").Add(); + col.Field("LastName").HeaderText("Last Name").ValidationRules(new { required = true }).Width("120").Add(); + col.Field("Title").HeaderText("Title").ValidationRules(new { required = true }).Width("130").Add(); + col.HeaderText("Employee Image").Template("#template").Edit(new { create = "create", read = "read", destroy = "destroy", write = "write" }).Width("130").Add(); +}).ActionBegin("actionBegin").AllowPaging().EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/edit-upload/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/edit-upload/tagHelper new file mode 100644 index 0000000000..ada79847c1 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/edit-upload/tagHelper @@ -0,0 +1,71 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/edit-upload/upload.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/edit-upload/upload.cs new file mode 100644 index 0000000000..f297b66bbd --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/edit-upload/upload.cs @@ -0,0 +1,5 @@ +public IActionResult Index() +{ + ViewBag.DataSource = OrdersDetails.GetAllRecords(); + return View(); +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs index 77d8fe70cf..686c81f8f8 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs @@ -1,6 +1,5 @@ public IActionResult Index() { - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; + ViewBag.DataSource = OrderDetails.GetAllRecords(); return View(); } diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/razor index c30d497891..2a791dcbb2 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/razor +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/razor @@ -1,35 +1,40 @@ -@using Syncfusion.EJ2 - -@Html.EJS().Grid("DialogTemplateEdit").DataSource((IEnumerable)ViewBag.DataSource).ActionBegin("actionBegin").Columns(col => +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => { - col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = true }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").Visible(false).Add(); - col.Field("Freight").HeaderText("Freight").EditType("numericedit").Format("C2").Width("150").Add(); - col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").Add(); - -}).AllowPaging().PageSettings(page => page.PageCount(2)).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() - + col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = "true"}).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("CustomerID").HeaderText("Customer Name").Width("150").ValidationRules(new { required = "true" }).Add(); + col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").EditType("numericedit").ValidationRules(new { required = "true",min=1, max=1000 }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").ValidationRules(new { required = "true" }).Width("150").Add(); +}).ActionBegin("actionBegin").EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/tagHelper index 6258056c8d..166d8d9740 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/show-hide-edit-dialog/tagHelper @@ -1,33 +1,40 @@ - + - - - - - - - + + + + + + - - + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/tabediting/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/tabediting/tagHelper index dbe4ed9263..b0b9595de9 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/tabediting/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/tabediting/tagHelper @@ -1,115 +1,125 @@ -@{ - ViewData["Title"] = "DialogTemplate"; -} - -
- - - - - - - - - -
- - - - + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-add-remove/columnvalid.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-add-remove/columnvalid.cs new file mode 100644 index 0000000000..b05a68da4f --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-add-remove/columnvalid.cs @@ -0,0 +1,7 @@ +public IActionResult Index() +{ + ViewBag.DataSource = OrderDetails.GetAllRecords(); + return View(); +} + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-add-remove/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-add-remove/razor new file mode 100644 index 0000000000..eb3cefd683 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-add-remove/razor @@ -0,0 +1,26 @@ +
+ @Html.EJS().CheckBox("checkbox").Label("Enable/Disable validation rule for customerID coulumn").Checked(true).Render() +
+@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => +{ + col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = "true"}).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); + col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").EditType("numericedit").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).ValidationRules(new { required = "true", min=1, max=1000 }).Add(); + col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").ValidationRules(new { required = "true"}).Add(); +}).ActionComplete("actionComplete").EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-add-remove/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-add-remove/tagHelper new file mode 100644 index 0000000000..150526eefe --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-add-remove/tagHelper @@ -0,0 +1,29 @@ + +
+ +
+ + + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-columnvalid/columnvalid.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-columnvalid/columnvalid.cs new file mode 100644 index 0000000000..3f41497f9f --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-columnvalid/columnvalid.cs @@ -0,0 +1,7 @@ +public IActionResult Index() +{ + ViewBag.DataSource = OrderDetails.GetAllRecords(); + return View(); +} + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-columnvalid/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-columnvalid/razor new file mode 100644 index 0000000000..19d36c770e --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-columnvalid/razor @@ -0,0 +1,7 @@ +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => +{ + col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = "true"}).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("CustomerID").HeaderText("Customer Name").Width("150").ValidationRules(new { required = "true", minLength=5 }).Add(); + col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").EditType("numericedit").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).ValidationRules(new { required = "true", min=1, max=1000 }).Add(); + col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").ValidationRules(new { required = "true"}).Add(); +}).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-columnvalid/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-columnvalid/tagHelper new file mode 100644 index 0000000000..fc5db6939b --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-columnvalid/tagHelper @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/customvalidation/customvalidation.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-customvalidation/customvalidation.cs similarity index 100% rename from ej2-asp-core-mvc/code-snippet/grid/edit/customvalidation/customvalidation.cs rename to ej2-asp-core-mvc/code-snippet/grid/edit/validation-customvalidation/customvalidation.cs diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-customvalidation/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-customvalidation/razor new file mode 100644 index 0000000000..273d163647 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-customvalidation/razor @@ -0,0 +1,16 @@ +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => +{ + col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = "true"}).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); + col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").EditType("numericedit").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).ValidationRules(new { required = "true", min=1, max=1000 }).Add(); + col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").ValidationRules(new { required = "true"}).Add(); +}).Load("load").EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-customvalidation/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-customvalidation/tagHelper new file mode 100644 index 0000000000..d06ff50773 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-customvalidation/tagHelper @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-dropdown-change/columnvalid.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-dropdown-change/columnvalid.cs new file mode 100644 index 0000000000..3f41497f9f --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-dropdown-change/columnvalid.cs @@ -0,0 +1,7 @@ +public IActionResult Index() +{ + ViewBag.DataSource = OrderDetails.GetAllRecords(); + return View(); +} + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-dropdown-change/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-dropdown-change/razor new file mode 100644 index 0000000000..5cfd1e0565 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-dropdown-change/razor @@ -0,0 +1,124 @@ +@{ + var jobRole = new List + { + new { role = "Team Lead" }, + new { role = "Manager" }, + new { role = "Engineer" }, + new { role = "Sales" }, + new { role = "Support" } + }; + var salaryDetails = new List + { + new { Salary = 6000 }, + new { Salary = 17000 }, + new { Salary = 18000 }, + new { Salary = 26000 }, + new { Salary = 25000 }, + new { Salary = 40000 }, + new { Salary = 35000 }, + new { Salary = 55000 }, + new { Salary = 65000 } + }; + var roleDropDownList = new Syncfusion.EJ2.DropDowns.DropDownList() { DataSource = jobRole, Query = "new ej.data.Query()", Fields = new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings() { Value = "role", Text = "role" }, AllowFiltering = true,Change="valueChange" }; + var salaryDropDownList = new Syncfusion.EJ2.DropDowns.DropDownList() { DataSource = salaryDetails, Query = "new ej.data.Query()", Fields = new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings() { Value = "Salary", Text = "Salary" }, AllowFiltering = true,Change="customFunction" }; +} + +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => +{ + col.Field("EmployeeID").HeaderText("Employee ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = "true"}).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("Role").HeaderText("Role").EditType("dropdownedit").Width("150").Edit(new { @params = roleDropDownList }).Add(); + col.Field("Salary").HeaderText("Salary").EditType("dropdownedit").Width("150").Edit(new { @params = salaryDropDownList }).Add(); + col.Field("Address").HeaderText("Address").Width("150").ValidationRules(new { required = "true"}).Add(); +}).Load("load").ActionBegin("actionBegin").EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-dropdown-change/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-dropdown-change/tagHelper new file mode 100644 index 0000000000..da11a0619b --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-dropdown-change/tagHelper @@ -0,0 +1,127 @@ +@{ + var jobRole = new List + { + new { role = "Team Lead" }, + new { role = "Manager" }, + new { role = "Engineer" }, + new { role = "Sales" }, + new { role = "Support" } + }; + var salaryDetails = new List + { + new { Salary = 6000 }, + new { Salary = 17000 }, + new { Salary = 18000 }, + new { Salary = 26000 }, + new { Salary = 25000 }, + new { Salary = 40000 }, + new { Salary = 35000 }, + new { Salary = 55000 }, + new { Salary = 65000 } + }; + var roleDropDownList = new Syncfusion.EJ2.DropDowns.DropDownList() { DataSource = jobRole, Query = "new ej.data.Query()", Fields = new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings() { Value = "role", Text = "role" }, AllowFiltering = true,Change="valueChange" }; + var salaryDropDownList = new Syncfusion.EJ2.DropDowns.DropDownList() { DataSource = salaryDetails, Query = "new ej.data.Query()", Fields = new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings() { Value = "Salary", Text = "Salary" }, AllowFiltering = true,Change="customFunction" }; +} + + + + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-numericcolumn/columnvalid.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-numericcolumn/columnvalid.cs new file mode 100644 index 0000000000..b05a68da4f --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-numericcolumn/columnvalid.cs @@ -0,0 +1,7 @@ +public IActionResult Index() +{ + ViewBag.DataSource = OrderDetails.GetAllRecords(); + return View(); +} + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-numericcolumn/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-numericcolumn/razor new file mode 100644 index 0000000000..e0cc63f249 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-numericcolumn/razor @@ -0,0 +1,31 @@ +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => +{ + col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = "true"}).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); + col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").EditType("numericedit").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Edit(new { @params = new Syncfusion.EJ2.Inputs.NumericTextBox() { Change= "onChange" }}).Add(); + col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").ValidationRules(new { required = "true"}).Add(); +}).Load("load").EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-numericcolumn/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-numericcolumn/tagHelper new file mode 100644 index 0000000000..c566a032ac --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-numericcolumn/tagHelper @@ -0,0 +1,33 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-position/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-position/razor new file mode 100644 index 0000000000..ba1cac98d9 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-position/razor @@ -0,0 +1,40 @@ +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).ActionComplete("onActionComplete").Height("348px").Columns(col => +{ + col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = true }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("CustomerID").HeaderText("Customer Name").Width("150").ValidationRules(new { required = true, minLength = 3 }).Add(); + col.Field("Freight").HeaderText("Freight").Format("C2").EditType("numericedit").ValidationRules(new { required = true, min = 1, max=1000 }).Width("150").Add(); + col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").ValidationRules(new { required = true }).Width("150").Add(); +}).AllowPaging().EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog).Template("#dialogtemplate"); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-position/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-position/tagHelper new file mode 100644 index 0000000000..601f315f87 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-position/tagHelper @@ -0,0 +1,41 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/validation-position/validation.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-position/validation.cs new file mode 100644 index 0000000000..c83158f048 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/validation-position/validation.cs @@ -0,0 +1,7 @@ +public IActionResult Index() +{ + ViewBag.DataSource =OrderDetails.GetAllRecords(); + return View(); +} + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/dialog.cs b/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/dialog.cs index da9dcb1404..d9ebad91a3 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/dialog.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/dialog.cs @@ -1,6 +1,5 @@ public IActionResult Index() { - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; + ViewBag.DataSource = OrderDetails.GetAllRecords(); return View(); } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/razor b/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/razor index 17b314dd33..f8fb88a2db 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/razor +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/razor @@ -1,121 +1,166 @@ -@Html.EJS().Grid("DialogTemplateEdit").DataSource((IEnumerable)ViewBag.DataSource).ActionComplete("actionComplete").Columns(col => +@using Newtonsoft.Json +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).ActionComplete("actionComplete").Height("348px").Columns(col => { - col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = true }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").ValidationRules(new { required = true, minLength = 3 }).Add(); - col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").Add(); - -}).AllowPaging().PageSettings(page => page.PageCount(2)).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog).Template("#dialogtemplate"); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() - - + col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = true }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("CustomerID").HeaderText("Customer Name").Width("150").ValidationRules(new { required = true, minLength = 3 }).Add(); + col.Field("Freight").HeaderText("Freight").Width("150").Add(); + col.Field("ShipCity").HeaderText("Ship City").Width("150").Add(); + col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width("150").Add(); + col.Field("Verified").HeaderText("Verified").Width("150").Type("boolean").DisplayAsCheckBox(true).Add(); +}).AllowPaging().EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog).Template("#dialogtemplate"); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() - - + - + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/tagHelper index c7bae7eb2b..c452d7413b 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/grid/edit/wizardediting/tagHelper @@ -1,129 +1,168 @@ -@{ - ViewData["Title"] = "DialogTemplate"; -} - -@model TestApplication.Models.OrdersDetails - -
- - - - - - - - - - -
- - - +@using Newtonsoft.Json + + + + + + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/add-params-for-filtering/excelfilter.cs b/ej2-asp-core-mvc/code-snippet/grid/how-to/add-params-for-filtering/excelfilter.cs deleted file mode 100644 index b1bb45d97b..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/add-params-for-filtering/excelfilter.cs +++ /dev/null @@ -1,21 +0,0 @@ - public IActionResult Index() - { - if (orders.Count() == 0) - DataSource(); - ViewBag.Datasource = orders; - return View(); - } - - public void DataSource() - { - int code = 10000; - for (int i = 1; i < 10; i++) - { - orders.Add(new OrderDetails(code + 1, "ALFKI", i + 0, 2.3 * i, false, new DateTime(1991, 05, 15), "Berlin", "Simons bistro", "Denmark", new DateTime(1996, 7, 16), "Kirchgasse 6")); - orders.Add(new OrderDetails(code + 2, "ANATR", i + 2, 3.3 * i, true, new DateTime(1990, 04, 04), "Madrid", "Queen Cozinha", "Brazil", new DateTime(1996, 9, 11), "Avda. Azteca 123")); - orders.Add(new OrderDetails(code + 3, "ANTON", i + 1, 4.3 * i, true, new DateTime(1957, 11, 30), "Cholchester", "Frankenversand", "Germany", new DateTime(1996, 10, 7), "Carrera 52 con Ave. Bolívar #65-98 Llano Largo")); - orders.Add(new OrderDetails(code + 4, "BLONP", i + 3, 5.3 * i, false, new DateTime(1930, 10, 22), "Marseille", "Ernst Handel", "Austria", new DateTime(1996, 12, 30), "Magazinweg 7")); - orders.Add(new OrderDetails(code + 5, "BOLID", i + 4, 6.3 * i, true, new DateTime(1953, 02, 18), "Tsawassen", "Hanari Carnes", "Switzerland", new DateTime(1997, 12, 3), "1029 - 12th Ave. S.")); - code += 5; - } - } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/add-params-for-filtering/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/add-params-for-filtering/razor deleted file mode 100644 index cc5274a8ce..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/add-params-for-filtering/razor +++ /dev/null @@ -1,10 +0,0 @@ - - @Html.EJS().Grid("ExcelFilter").DataSource((IEnumerable)ViewBag.DataSource).AllowFiltering().FilterSettings(Filter => Filter.Type(Syncfusion.EJ2.Grids.FilterType.Menu)).Columns(col => - { - col.Field("OrderID").HeaderText("Order ID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Filter((new { @params = new { showSpinButton = false } }).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); - col.Field("OrderDate").HeaderText("Order Date").Width("130").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Format("yMd").Add(); - col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("ShipCountry").HeaderText("Ship Country").Width("120").Add(); - - }).AllowPaging().Render() \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/add-params-for-filtering/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/add-params-for-filtering/tagHelper deleted file mode 100644 index 000a021adc..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/add-params-for-filtering/tagHelper +++ /dev/null @@ -1,14 +0,0 @@ -@{ - - var filterParams = new { params = new {showSpinButton ="false"};}; -} - - - - - - - - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/collapse-grouped-rows/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/collapse-grouped-rows/razor deleted file mode 100644 index e5d1e8a056..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/collapse-grouped-rows/razor +++ /dev/null @@ -1,19 +0,0 @@ -@Html.EJS().Grid("Grid").DataSource((IEnumerable)ViewBag.dataSource).DataBound("bound").Columns(col => -{ - col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); - col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("ShipName").HeaderText("Ship Name").Width("150").Add(); - col.Field("ShipCountry").HeaderText("Ship Country").Width("150").EditType("dropdownedit").Add(); - -}).AllowPaging().AllowGrouping().GroupSettings(group => group.Columns(new string[] { "ShipCountry" })).Render() - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/collapse-grouped-rows/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/collapse-grouped-rows/tagHelper deleted file mode 100644 index 75d3b1eff9..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/collapse-grouped-rows/tagHelper +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/databasedselection/databasedselection.cs b/ej2-asp-core-mvc/code-snippet/grid/how-to/databasedselection/databasedselection.cs deleted file mode 100644 index da9dcb1404..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/databasedselection/databasedselection.cs +++ /dev/null @@ -1,6 +0,0 @@ -public IActionResult Index() -{ - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; - return View(); -} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/databasedselection/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/databasedselection/razor deleted file mode 100644 index 26db403b1b..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/databasedselection/razor +++ /dev/null @@ -1,25 +0,0 @@ - -@Html.EJS().Grid("Grid").DataSource((IEnumerable)ViewBag.DataSource).Columns(col => -{ - col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); - col.Field("EmployeeID").HeaderText("Employee ID").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("150").Add(); - col.Field("ShipCity").HeaderText("Ship City").Width("120").Add(); - col.Field("ShipCountry").HeaderText("Ship Country").Width("150").Add(); - -}).AllowPaging().DataBound("dataBound").RowDataBound("rowDataBound").SelectionSettings(select => select.Type(Syncfusion.EJ2.Grids.SelectionType.Multiple)).Render() - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/databasedselection/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/databasedselection/tagHelper deleted file mode 100644 index 889ee721e1..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/databasedselection/tagHelper +++ /dev/null @@ -1,30 +0,0 @@ -
- - - - - - - - - - -
- - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/disable-sorting-excel/disable-sorting-excel.cs b/ej2-asp-core-mvc/code-snippet/grid/how-to/disable-sorting-excel/disable-sorting-excel.cs deleted file mode 100644 index 4019df2042..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/disable-sorting-excel/disable-sorting-excel.cs +++ /dev/null @@ -1,5 +0,0 @@ -public IActionResult Index() -{ - ViewBag.DataSource = OrderDetails.GetAllRecords(); - return View(); -} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/disable-sorting-excel/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/disable-sorting-excel/razor deleted file mode 100644 index 1f9ac0b502..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/disable-sorting-excel/razor +++ /dev/null @@ -1,20 +0,0 @@ - - -@Html.EJS().Grid("Grid").DataSource((IEnumerable)ViewBag.DataSource).Columns(col => -{ - col.Field("OrderID").HeaderText("Order ID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); - col.Field("OrderDate").HeaderText("Order Date").Width("130").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Format("yMd").Add(); - col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("ShipCountry").HeaderText("Ship Country").Width("120").Add(); - -}).AllowFiltering().AllowPaging().FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel); }).Render() - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/disable-sorting-excel/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/disable-sorting-excel/tagHelper deleted file mode 100644 index 4173c0adfb..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/disable-sorting-excel/tagHelper +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/disablegrid.cs b/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/disablegrid.cs index da9dcb1404..d9ebad91a3 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/disablegrid.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/disablegrid.cs @@ -1,6 +1,5 @@ public IActionResult Index() { - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; + ViewBag.DataSource = OrderDetails.GetAllRecords(); return View(); } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/razor index 01a35a75e3..003f328434 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/razor +++ b/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/razor @@ -1,37 +1,32 @@ -@Html.EJS().Button("element").Content("Enable/Disable Grid").Render() - - -@Html.EJS().Grid("Grid").DataSource((IEnumerable)ViewBag.DataSource).Columns(col => +
+ @Html.EJS().Button("element").Content("Enable/Disable Grid").Render() +
+@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => { - col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").Add(); + col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add(); col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); - col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").Add(); + col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").EditType("numericedit").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); col.Field("ShipCountry").HeaderText("Ship Country").Width("150").Add(); - }).AllowPaging().EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/tagHelper index 3863cdf903..99883ee0a0 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/grid/how-to/disablegrid/tagHelper @@ -1,37 +1,35 @@ - - -
- +
+ +
+
+ - +
- - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/group-page-size/group-page-size.cs b/ej2-asp-core-mvc/code-snippet/grid/how-to/group-page-size/group-page-size.cs deleted file mode 100644 index f6f0126ac7..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/group-page-size/group-page-size.cs +++ /dev/null @@ -1,6 +0,0 @@ -public IActionResult Index() -{ - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; - return View(); -} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/group-page-size/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/group-page-size/razor deleted file mode 100644 index 8d358ab921..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/group-page-size/razor +++ /dev/null @@ -1,17 +0,0 @@ - - -@Html.EJS().Grid("FlatGrid").DataSource((IEnumerable)ViewBag.DataSource).AllowSorting().Columns(col => -{ - col.Field("OrderID").HeaderText("Order ID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); - col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("ShipCountry").HeaderText("Ship Country").Width("150").Add(); - -}).AllowPaging().PageSettings(page => page.PageSize(5)).AllowGrouping().GroupSettings(group=>group.Columns(new string[] { "ShipCountry" })).Render() \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/group-page-size/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/group-page-size/tagHelper deleted file mode 100644 index 882df4f79a..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/group-page-size/tagHelper +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/hidearrow/hidearrow.cs b/ej2-asp-core-mvc/code-snippet/grid/how-to/hidearrow/hidearrow.cs deleted file mode 100644 index da9dcb1404..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/hidearrow/hidearrow.cs +++ /dev/null @@ -1,6 +0,0 @@ -public IActionResult Index() -{ - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; - return View(); -} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/hidearrow/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/hidearrow/razor deleted file mode 100644 index 0e95add8c4..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/hidearrow/razor +++ /dev/null @@ -1,53 +0,0 @@ -@Html.EJS().Grid("Grid").DataSource((IEnumerable)ViewBag.DataSource).Load("load").RowDataBound("rowDataBound").Columns(col => -{ - col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").Add(); - col.Field("EmployeeID").HeaderText("Employee ID").Width("150").Add(); - col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").Add(); - col.Field("ShipCountry").HeaderText("Ship Country").Width("150").Add(); - -}).AllowPaging().Render() - - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/hidearrow/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/hidearrow/tagHelper deleted file mode 100644 index 000f2ef3b6..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/hidearrow/tagHelper +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/hierarchyprint/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/hierarchyprint/razor deleted file mode 100644 index cb8d8f5842..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/hierarchyprint/razor +++ /dev/null @@ -1,65 +0,0 @@ -@{ - var SecondChildGrid = new Syncfusion.EJ2.Grids.Grid() { DataSource = (IEnumerable)ViewBag.CustomerDataSource, - QueryString = "CustomerID", - Columns = new List - { - new Syncfusion.EJ2.Grids.GridColumn(){ Field="CustomerID", HeaderText="Customer ID", Width="90", TextAlign=Syncfusion.EJ2.Grids.TextAlign.Right }, - new Syncfusion.EJ2.Grids.GridColumn(){ Field="ShipCountry", HeaderText="Ship Country", Width="90" }, - } - }; - var ChildGrid = new Syncfusion.EJ2.Grids.Grid() { DataSource = (IEnumerable)ViewBag.DataSource, - QueryString = "EmployeeID", - Columns = new List - { - new Syncfusion.EJ2.Grids.GridColumn(){ Field="OrderID", HeaderText="Order ID", Width="120" }, - new Syncfusion.EJ2.Grids.GridColumn(){ Field="Freight", HeaderText="Freight", Width="120", Format="C2", TextAlign=Syncfusion.EJ2.Grids.TextAlign.Right }, - new Syncfusion.EJ2.Grids.GridColumn(){ Field="ShipName", HeaderText="Ship Name", Width="150" }, - new Syncfusion.EJ2.Grids.GridColumn(){ Field="ShipCity", HeaderText="Ship City", Width="120" }, - }, - ChildGrid = SecondChildGrid - }; - } - -@Html.EJS().Grid("HierarchyPrint").DataSource((IEnumerable)ViewBag.EmpDataSource).HierarchyPrintMode(Syncfusion.EJ2.Grids.HierarchyGridPrintMode.Expanded).Columns(col => -{ - col.Field("EmployeeID").HeaderText("Employee ID").Width("125").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("FirstName").HeaderText("Name").Width("125").Add(); - col.Field("Title").HeaderText("Title").Width("180").Add(); - col.Field("City").HeaderText("City").Width("135").Add(); - -}).AllowSorting().AllowPaging().PageSettings(page => page.PageSize(5)).Toolbar(new List() { "Print"}).ChildGrid(ChildGrid).ActionBegin("actionBegin").Load("load").Render() - - - diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/hierarchyprint/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/hierarchyprint/tagHelper deleted file mode 100644 index 964817c1a9..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/hierarchyprint/tagHelper +++ /dev/null @@ -1,69 +0,0 @@ - @{ - var SecondChildGrid = new Syncfusion.EJ2.Grids.Grid() { - DataSource = (IEnumerable)ViewBag.DataSource, - QueryString = "CustomerID", - Columns = new List - { - new Syncfusion.EJ2.Grids.GridColumn(){ Field="CustomerID", HeaderText="Customer ID", Width="90", TextAlign=Syncfusion.EJ2.Grids.TextAlign.Right }, - new Syncfusion.EJ2.Grids.GridColumn(){ Field="Country", HeaderText="Country", Width="90" }, - } - }; - } - -@{ - var ChildGrid = new Syncfusion.EJ2.Grids.Grid() { - DataSource = (IEnumerable)ViewBag.DataSource, - QueryString = "EmployeeID", - Columns = new List - { - new Syncfusion.EJ2.Grids.GridColumn(){ Field="OrderID", HeaderText="Order ID", Width="120" }, - new Syncfusion.EJ2.Grids.GridColumn(){ Field="Freight", HeaderText="Freight", Width="120", Format="C2", TextAlign=Syncfusion.EJ2.Grids.TextAlign.Right }, - new Syncfusion.EJ2.Grids.GridColumn(){ Field="ShipName", HeaderText="Ship Name", Width="150" }, - new Syncfusion.EJ2.Grids.GridColumn(){ Field="ShipCity", HeaderText="Ship City", Width="120" }, - }, - ChildGrid = SecondChildGrid - }; -} - - - - - - - - - - - - diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/open-dropdown-popup/open-dropdown-popup.cs b/ej2-asp-core-mvc/code-snippet/grid/how-to/open-dropdown-popup/open-dropdown-popup.cs deleted file mode 100644 index 4bd8a95ac9..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/open-dropdown-popup/open-dropdown-popup.cs +++ /dev/null @@ -1,6 +0,0 @@ - public IActionResult Index() - { - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; - return View(); - } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/open-dropdown-popup/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/open-dropdown-popup/razor deleted file mode 100644 index 7ce4c95131..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/open-dropdown-popup/razor +++ /dev/null @@ -1,35 +0,0 @@ -@Html.EJS().Grid("Grid").ActionComplete("onActionComplete").DataSource((IEnumerable)ViewBag.DataSource).AllowPaging().Columns(col => -{ - col.Field("OrderID").HeaderText("Order ID").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width(100).IsPrimaryKey(true).Add(); - col.Field("CustomerID").HeaderText("Customer ID").Width(120).Add(); - col.Field("Freight").HeaderText("Freight").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width(120).Format("C2").Add(); - col.Field("ShipCountry").HeaderText("Ship Country").EditType("dropdownedit").Width(150).Add(); -}).Load("load").EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/open-dropdown-popup/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/open-dropdown-popup/tagHelper deleted file mode 100644 index 6a2c3d5248..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/open-dropdown-popup/tagHelper +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/pagerdropdown/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/pagerdropdown/razor deleted file mode 100644 index 32b723ef06..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/pagerdropdown/razor +++ /dev/null @@ -1,9 +0,0 @@ -@Html.EJS().Grid("Grid").DataSource((IEnumerable)ViewBag.DataSource).Columns(col => -{ - col.Field("OrderID").HeaderText("Order ID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); - col.Field("OrderDate").HeaderText("Order Date").Width("130").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Format("yMd").Add(); - col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("ShipCountry").HeaderText("Ship Country").Width("120").Add(); - -}).AllowPaging().PageSettings(page => { page.PageSizes((new string[] { "5", "10", "All" })); }).Render() \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/pagerdropdown/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/pagerdropdown/tagHelper deleted file mode 100644 index c8035935b9..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/pagerdropdown/tagHelper +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/row-cell-index/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/row-cell-index/razor deleted file mode 100644 index 362026973f..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/row-cell-index/razor +++ /dev/null @@ -1,16 +0,0 @@ -@Html.EJS().Grid("Grid").DataSource((IEnumerable)ViewBag.DataSource).RowSelected("rowSelected").Columns(col => -{ - col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); - col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("ShipName").HeaderText("Ship Name").Width("150").Add(); - col.Field("ShipCountry").HeaderText("Ship Country").Width("150").EditType("dropdownedit").Add(); - -}).AllowPaging().Render() - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/row-cell-index/rowcellidx.cs b/ej2-asp-core-mvc/code-snippet/grid/how-to/row-cell-index/rowcellidx.cs deleted file mode 100644 index 4019df2042..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/row-cell-index/rowcellidx.cs +++ /dev/null @@ -1,5 +0,0 @@ -public IActionResult Index() -{ - ViewBag.DataSource = OrderDetails.GetAllRecords(); - return View(); -} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/row-cell-index/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/row-cell-index/tagHelper deleted file mode 100644 index 96fa118b36..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/row-cell-index/tagHelper +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/single-click-inline-edit/razor b/ej2-asp-core-mvc/code-snippet/grid/how-to/single-click-inline-edit/razor deleted file mode 100644 index 967bfec17a..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/single-click-inline-edit/razor +++ /dev/null @@ -1,22 +0,0 @@ -@Html.EJS().Grid("Grid").DataSource((IEnumerable)ViewBag.DataSource).AllowPaging().Columns(col => -{ - col.Field("OrderID").HeaderText("Order ID").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width(100).IsPrimaryKey(true).Add(); - col.Field("CustomerID").HeaderText("Customer ID").Width(120).Add(); - col.Field("Freight").HeaderText("Freight").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width(120).Format("C2").Add(); - col.Field("ShipCountry").HeaderText("Ship Country").Width(150).Add(); -}).Load("load").EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/single-click-inline-edit/single-click-normal-edit.cs b/ej2-asp-core-mvc/code-snippet/grid/how-to/single-click-inline-edit/single-click-normal-edit.cs deleted file mode 100644 index 4bd8a95ac9..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/single-click-inline-edit/single-click-normal-edit.cs +++ /dev/null @@ -1,6 +0,0 @@ - public IActionResult Index() - { - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; - return View(); - } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/single-click-inline-edit/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/single-click-inline-edit/tagHelper deleted file mode 100644 index 17ebdaf11d..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/single-click-inline-edit/tagHelper +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/titleprint/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/how-to/titleprint/tagHelper deleted file mode 100644 index 206a458867..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/titleprint/tagHelper +++ /dev/null @@ -1,23 +0,0 @@ -
- - - - - - - - - -
- - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/titleprint/titleprint.cs b/ej2-asp-core-mvc/code-snippet/grid/how-to/titleprint/titleprint.cs deleted file mode 100644 index da9dcb1404..0000000000 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/titleprint/titleprint.cs +++ /dev/null @@ -1,6 +0,0 @@ -public IActionResult Index() -{ - var Order = OrderDetails.GetAllRecords(); - ViewBag.DataSource = Order; - return View(); -} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/pagerdropdown/pagerdropdown.cs b/ej2-asp-core-mvc/code-snippet/grid/print/print-add-title/print.cs similarity index 98% rename from ej2-asp-core-mvc/code-snippet/grid/how-to/pagerdropdown/pagerdropdown.cs rename to ej2-asp-core-mvc/code-snippet/grid/print/print-add-title/print.cs index 4019df2042..d9ebad91a3 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/pagerdropdown/pagerdropdown.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/print/print-add-title/print.cs @@ -2,4 +2,4 @@ public IActionResult Index() { ViewBag.DataSource = OrderDetails.GetAllRecords(); return View(); -} \ No newline at end of file +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/titleprint/razor b/ej2-asp-core-mvc/code-snippet/grid/print/print-add-title/razor similarity index 84% rename from ej2-asp-core-mvc/code-snippet/grid/how-to/titleprint/razor rename to ej2-asp-core-mvc/code-snippet/grid/print/print-add-title/razor index f3b94304a3..89d6a9f926 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/titleprint/razor +++ b/ej2-asp-core-mvc/code-snippet/grid/print/print-add-title/razor @@ -1,22 +1,19 @@ - -@Html.EJS().Grid("Grid").DataSource((IEnumerable)ViewBag.DataSource).Columns(col => +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.DataSource).Height("348px").Columns(col => { col.Field("OrderID").HeaderText("Order ID").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add(); col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); col.Field("ShipCity").HeaderText("Ship City").Width("120").Add(); col.Field("ShipCountry").HeaderText("Ship Country").Width("150").Add(); - }).AllowPaging().BeforePrint("beforePrint").Toolbar(new List() { "Print" }).Render() - \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/print/print-add-title/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/print/print-add-title/tagHelper new file mode 100644 index 0000000000..c0a713b817 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/print/print-add-title/tagHelper @@ -0,0 +1,20 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/hierarchyprint/hierarchyprint.cs b/ej2-asp-core-mvc/code-snippet/grid/print/print-expanded-state/hierarchyprint.cs similarity index 72% rename from ej2-asp-core-mvc/code-snippet/grid/how-to/hierarchyprint/hierarchyprint.cs rename to ej2-asp-core-mvc/code-snippet/grid/print/print-expanded-state/hierarchyprint.cs index f205693de8..000a47ca09 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/how-to/hierarchyprint/hierarchyprint.cs +++ b/ej2-asp-core-mvc/code-snippet/grid/print/print-expanded-state/hierarchyprint.cs @@ -1,7 +1,7 @@ public IActionResult Index() { ViewBag.DataSource = OrdersDetails.GetAllRecords();; - ViewBag.EmpDataSource = EmployeeView.GetAllRecords(); + ViewBag.EmployeeDataSource = EmployeeView.GetAllRecords(); ViewBag.CustomerDataSource = Customer.GetAllRecords(); return View(); } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/grid/print/print-expanded-state/razor b/ej2-asp-core-mvc/code-snippet/grid/print/print-expanded-state/razor new file mode 100644 index 0000000000..0da1446fcd --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/print/print-expanded-state/razor @@ -0,0 +1,59 @@ +@{ + var secondChildGrid = new Syncfusion.EJ2.Grids.Grid() { DataSource = (IEnumerable)ViewBag.CustomerDataSource, + QueryString = "CustomerID", + Columns = new List + { + new Syncfusion.EJ2.Grids.GridColumn(){ Field="CustomerID", HeaderText="Customer ID", Width="90", TextAlign=Syncfusion.EJ2.Grids.TextAlign.Right }, + new Syncfusion.EJ2.Grids.GridColumn(){ Field="ShipCountry", HeaderText="Ship Country", Width="90" }, + } + }; + var childGrid = new Syncfusion.EJ2.Grids.Grid() { DataSource = (IEnumerable)ViewBag.DataSource, + QueryString = "EmployeeID", + Columns = new List + { + new Syncfusion.EJ2.Grids.GridColumn(){ Field="OrderID", HeaderText="Order ID", Width="120" }, + new Syncfusion.EJ2.Grids.GridColumn(){ Field="Freight", HeaderText="Freight", Width="120", Format="C2", TextAlign=Syncfusion.EJ2.Grids.TextAlign.Right }, + new Syncfusion.EJ2.Grids.GridColumn(){ Field="ShipName", HeaderText="Ship Name", Width="150" }, + new Syncfusion.EJ2.Grids.GridColumn(){ Field="ShipCity", HeaderText="Ship City", Width="120" }, + }, + ChildGrid = secondChildGrid + }; +} + +@Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.EmployeeDataSource).HierarchyPrintMode(Syncfusion.EJ2.Grids.HierarchyGridPrintMode.Expanded).Columns(col => +{ + col.Field("EmployeeID").HeaderText("Employee ID").Width("125").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); + col.Field("FirstName").HeaderText("First Name").Width("125").Add(); + col.Field("Title").HeaderText("Title").Width("180").Add(); + col.Field("City").HeaderText("City").Width("135").Add(); +}).AllowPaging().PageSettings(page => page.PageSize(4)).Toolbar(new List() { "Print"}).ChildGrid(childGrid).ActionBegin("actionBegin").Load("load").Render(); + diff --git a/ej2-asp-core-mvc/code-snippet/grid/print/print-expanded-state/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/print/print-expanded-state/tagHelper new file mode 100644 index 0000000000..fe4fadaf08 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/grid/print/print-expanded-state/tagHelper @@ -0,0 +1,64 @@ +@{ + var secondChildGrid = new Syncfusion.EJ2.Grids.Grid() { + DataSource = (IEnumerable)ViewBag.CustomerDataSource, + QueryString = "CustomerID", + Columns = new List + { + new Syncfusion.EJ2.Grids.GridColumn(){ Field="CustomerID", HeaderText="Customer ID", Width="90", TextAlign=Syncfusion.EJ2.Grids.TextAlign.Right }, + new Syncfusion.EJ2.Grids.GridColumn(){ Field="Country", HeaderText="Country", Width="90" }, + } + }; +} +@{ + var childGrid = new Syncfusion.EJ2.Grids.Grid() { + DataSource = (IEnumerable)ViewBag.DataSource, + QueryString = "EmployeeID", + Columns = new List + { + new Syncfusion.EJ2.Grids.GridColumn(){ Field="OrderID", HeaderText="Order ID", Width="120" }, + new Syncfusion.EJ2.Grids.GridColumn(){ Field="Freight", HeaderText="Freight", Width="120", Format="C2", TextAlign=Syncfusion.EJ2.Grids.TextAlign.Right }, + new Syncfusion.EJ2.Grids.GridColumn(){ Field="ShipName", HeaderText="Ship Name", Width="150" }, + new Syncfusion.EJ2.Grids.GridColumn(){ Field="ShipCity", HeaderText="Ship City", Width="120" }, + }, + ChildGrid = secondChildGrid + }; +} + + + + + + + + + + diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/sort-comparer/razor b/ej2-asp-core-mvc/code-snippet/grid/sorting/sort-comparer/razor similarity index 100% rename from ej2-asp-core-mvc/code-snippet/grid/how-to/sort-comparer/razor rename to ej2-asp-core-mvc/code-snippet/grid/sorting/sort-comparer/razor diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/sort-comparer/sort-comparer.cs b/ej2-asp-core-mvc/code-snippet/grid/sorting/sort-comparer/sort-comparer.cs similarity index 100% rename from ej2-asp-core-mvc/code-snippet/grid/how-to/sort-comparer/sort-comparer.cs rename to ej2-asp-core-mvc/code-snippet/grid/sorting/sort-comparer/sort-comparer.cs diff --git a/ej2-asp-core-mvc/code-snippet/grid/how-to/sort-comparer/tagHelper b/ej2-asp-core-mvc/code-snippet/grid/sorting/sort-comparer/tagHelper similarity index 100% rename from ej2-asp-core-mvc/code-snippet/grid/how-to/sort-comparer/tagHelper rename to ej2-asp-core-mvc/code-snippet/grid/sorting/sort-comparer/tagHelper diff --git a/ej2-asp-core-mvc/code-snippet/listbox/drag-drop/dual-drag/dualdraglistbox.cs b/ej2-asp-core-mvc/code-snippet/listbox/drag-drop/dual-drag/dualdraglistbox.cs new file mode 100644 index 0000000000..a2f4ca2e8c --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/listbox/drag-drop/dual-drag/dualdraglistbox.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using WebApplication1.Models; + +namespace WebApplication1.Controllers +{ + public class ListBoxController : Controller + { + public IActionResult dualdraglistbox() + { + ViewBag.groupA = new string[] { "Austrlia", "Bermuda", "Canada", "Cameroon", "Denmark", "France", "Finland", "Germany", "Hong kong" }; + ViewBag.groupB = new string[] { "India", "Italy", "Japan", "Mexico", "Norway", "Poland", "Switzerland", "United Kingdom", "United States" }; + ViewBag.items = new string[] { "moveUp", "moveDown", "moveTo", "moveFrom", "moveAllTo", "moveAllFrom" }; + return View(); + } + } +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/listbox/drag-drop/dual-drag/razor b/ej2-asp-core-mvc/code-snippet/listbox/drag-drop/dual-drag/razor new file mode 100644 index 0000000000..21c62cc3f7 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/listbox/drag-drop/dual-drag/razor @@ -0,0 +1,8 @@ +
+
+ @Html.EJS().ListBox("listbox1").DataSource((IEnumerable)ViewBag.groupA).AllowDragAndDrop(true).Scope("#listbox2").ToolbarSettings(new Syncfusion.EJ2.DropDowns.ListBoxToolbarSettings { Items = ViewBag.items }).Render() + +
+ @Html.EJS().ListBox("listbox2").DataSource((IEnumerable)ViewBag.groupB).AllowDragAndDrop(true).Scope("#listbox2").Render() + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/listbox/drag-drop/dual-drag/taghelper b/ej2-asp-core-mvc/code-snippet/listbox/drag-drop/dual-drag/taghelper new file mode 100644 index 0000000000..204fe4869e --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/listbox/drag-drop/dual-drag/taghelper @@ -0,0 +1,10 @@ +
+
+ + + +
+
+ +
+
\ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/tree-grid/getting-start-mvc/error-handling/razor b/ej2-asp-core-mvc/code-snippet/tree-grid/getting-start-mvc/error-handling/razor index 983bebd7af..86f7501b6c 100644 --- a/ej2-asp-core-mvc/code-snippet/tree-grid/getting-start-mvc/error-handling/razor +++ b/ej2-asp-core-mvc/code-snippet/tree-grid/getting-start-mvc/error-handling/razor @@ -20,7 +20,7 @@ }).Height(400).ChildMapping("Children").ActionFailure("actionFailure").TreeColumnIndex(1).Render()) - < script > + diff --git a/ej2-asp-core-mvc/dashboard-layout/EJ2_ASP.MVC/getting-started.md b/ej2-asp-core-mvc/dashboard-layout/EJ2_ASP.MVC/getting-started.md index 78022d51d6..31fd283a54 100644 --- a/ej2-asp-core-mvc/dashboard-layout/EJ2_ASP.MVC/getting-started.md +++ b/ej2-asp-core-mvc/dashboard-layout/EJ2_ASP.MVC/getting-started.md @@ -49,7 +49,7 @@ Add **Syncfusion.EJ2** namespace reference in `Web.config` under `Views` folder. ## Add stylesheet and script resources -Here, the theme and script is referred using CDN inside the `` of `~/Pages/Shared/_Layout.cshtml` file as follows, +Here, the theme and script is referred using CDN inside the `` of **~/Pages/Shared/_Layout.cshtml** file as follows, {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} @@ -69,7 +69,7 @@ N> Checkout the [Themes topic](https://ej2.syncfusion.com/aspnetmvc/documentatio ## Register Syncfusion® script manager -Also, register the script manager `EJS().ScriptManager()` at the end of `` in the `~/Pages/Shared/_Layout.cshtml` file as follows. +Also, register the script manager `EJS().ScriptManager()` at the end of `` in the **~/Pages/Shared/_Layout.cshtml** file as follows. {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} @@ -85,16 +85,16 @@ Also, register the script manager `EJS().ScriptManager()` at the end of `` ## Add ASP.NET MVC Dashboard Layout control -Now, add the Syncfusion® ASP.NET MVC Dashboard Layout control in `~/Views/Home/Index.cshtml` page by the following ways. +Now, add the Syncfusion® ASP.NET MVC Dashboard Layout control in **~/Views/Home/Index.cshtml** page by the following ways. * Defined the panels property as the attribute in the content template. * Using the [Panels](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Layouts.DashboardLayout.html#Syncfusion_EJ2_Layouts_DashboardLayout_Panels) property through helper. ### Setting the panels property using content template -You can render the Dashboard Layout control by adding the panels property as the attribute to the content template. Add the content template with panel definition for Dashboard Layout into your `index.cshtml` page which is present under `Views/Home` folder. +You can render the Dashboard Layout control by adding the panels property as the attribute to the content template. Add the content template with panel definition for Dashboard Layout into your **index.cshtml** page which is present under **Views/Home** folder. -In the following sample, the dashboard layout is rendered with [Panels](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Layouts.DashboardLayout.html#Syncfusion_EJ2_Layouts_DashboardLayout_Panels) property using content template. +In the following sample, the Dashboard Layout is rendered with [Panels](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Layouts.DashboardLayout.html#Syncfusion_EJ2_Layouts_DashboardLayout_Panels) property using content template. {% tabs %} {% highlight razor tabtitle="CSHTML" %} @@ -113,7 +113,7 @@ Press Ctrl+F5 (Windows) or +F5 (m You can render the Dashboard Layout control by using the **panels** property through helper. -In the following sample, the dashboard layout is rendered with [Panels](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Layouts.DashboardLayout.html#Syncfusion_EJ2_Layouts_DashboardLayout_Panels) property using tag helper. +In the following sample, the Dashboard Layout is rendered with [Panels](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Layouts.DashboardLayout.html#Syncfusion_EJ2_Layouts_DashboardLayout_Panels) property using tag helper. {% tabs %} {% highlight razor tabtitle="CSHTML" %} diff --git a/ej2-asp-core-mvc/dashboard-layout/EJ2_ASP.NETCORE/getting-started.md b/ej2-asp-core-mvc/dashboard-layout/EJ2_ASP.NETCORE/getting-started.md index 2a5e478945..7f66e763a6 100644 --- a/ej2-asp-core-mvc/dashboard-layout/EJ2_ASP.NETCORE/getting-started.md +++ b/ej2-asp-core-mvc/dashboard-layout/EJ2_ASP.NETCORE/getting-started.md @@ -38,7 +38,7 @@ Install-Package Syncfusion.EJ2.AspNet.Core -Version {{ site.releaseversion }} N> Syncfusion® ASP.NET Core controls are available in [nuget.org.](https://www.nuget.org/packages?q=syncfusion.EJ2) Refer to [NuGet packages topic](https://ej2.syncfusion.com/aspnetcore/documentation/nuget-packages) to learn more about installing NuGet packages in various OS environments. The Syncfusion.EJ2.AspNet.Core NuGet package has dependencies, [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) for JSON serialization and [Syncfusion.Licensing](https://www.nuget.org/packages/Syncfusion.Licensing/) for validating Syncfusion® license key. ## Add Syncfusion® ASP.NET Core Tag Helper -Open `~/Pages/_ViewImports.cshtml` file and import the `Syncfusion.EJ2` TagHelper. +Open **~/Pages/_ViewImports.cshtml** file and import the `Syncfusion.EJ2` TagHelper. {% tabs %} {% highlight C# tabtitle="~/_ViewImports.cshtml" %} @@ -50,7 +50,7 @@ Open `~/Pages/_ViewImports.cshtml` file and import the `Syncfusion.EJ2` TagHelpe ## Add stylesheet and script resources -Here, the theme and script is referred using CDN inside the `` of `~/Pages/Shared/_Layout.cshtml` file as follows, +Here, the theme and script is referred using CDN inside the `` of **~/Pages/Shared/_Layout.cshtml** file as follows, {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} @@ -72,7 +72,7 @@ N> Checkout the [Adding Script Reference](https://ej2.syncfusion.com/aspnetcore/ ## Register Syncfusion® Script Manager -Also, register the script manager `` at the end of `` in the ASP.NET Core application as follows. +Also, register the script manager `` at the end of `` in the ASP.NET Core application as follows. {% tabs %} {% highlight cshtml tabtitle="~/_Layout.cshtml" %} @@ -88,14 +88,14 @@ Also, register the script manager `` at the end of `` in the A ## Add ASP.NET Core DashboardLayout control -Now, add the Syncfusion® ASP.NET Core DashboardLayout tag helper in `~/Pages/Index.cshtml` page. +Now, add the Syncfusion® ASP.NET Core DashboardLayout tag helper in **~/Pages/Index.cshtml** page. * Defined the panels property as the attribute in the content template. * Using the [`panels`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Layouts.DashboardLayout.html#Syncfusion_EJ2_Layouts_DashboardLayout_Panels) property through tag helper. ### Setting the panels property using content template -DashboardLayout control can be rendered by using the [`ejs-dashboardlayout`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Layouts.DashboardLayout.html) tag helper in ASP.NET Core application. Add the below simple code to your `index.cshtml` page which is available within the `Views/Home` folder, to initialize the DashboardLayout. +DashboardLayout control can be rendered by using the [`ejs-dashboardlayout`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Layouts.DashboardLayout.html) tag helper in ASP.NET Core application. Add the below simple code to your **index.cshtml** page which is available within the **Views/Home** folder, to initialize the DashboardLayout. In the following sample, the dashboardlayout is rendered with [`panels`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Layouts.DashboardLayout.html#Syncfusion_EJ2_Layouts_DashboardLayout_Panels) property using content template. diff --git a/ej2-asp-core-mvc/dashboard-layout/accessibility.md b/ej2-asp-core-mvc/dashboard-layout/accessibility.md index 0d77eaf304..14507d82fd 100644 --- a/ej2-asp-core-mvc/dashboard-layout/accessibility.md +++ b/ej2-asp-core-mvc/dashboard-layout/accessibility.md @@ -1,7 +1,7 @@ --- layout: post -title: Accessibility in ##Platform_Name## Dashboard Layout Component -description: Learn here all about Accessibility in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Accessibility in ##Platform_Name## Dashboard Layout control +description: Learn here all about Accessibility in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Accessibility publishingplatform: ##Platform_Name## @@ -11,7 +11,7 @@ documentation: ug # Accessibility -The Dashboard Layout component has been designed with keeping the `WAI-ARIA` specifications in mind and applying the `WAI-ARIA` roles, states, and properties. This component is characterized by ARIA accessibility support, which makes navigation easy for people who use assistive technologies (AT). +The Dashboard Layout control has been designed with keeping the `WAI-ARIA` specifications in mind and applying the `WAI-ARIA` roles, states, and properties. This control is characterized by ARIA accessibility support, which makes navigation easy for people who use assistive technologies (AT). ## ARIA attributes diff --git a/ej2-asp-core-mvc/dashboard-layout/adaptive-layout.md b/ej2-asp-core-mvc/dashboard-layout/adaptive-layout.md index 81a4e319c2..36d5d579bc 100644 --- a/ej2-asp-core-mvc/dashboard-layout/adaptive-layout.md +++ b/ej2-asp-core-mvc/dashboard-layout/adaptive-layout.md @@ -1,7 +1,7 @@ --- layout: post -title: Adaptive Layout in ##Platform_Name## Dashboard Layout Component -description: Learn here all about Adaptive Layout in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Adaptive Layout in ##Platform_Name## Dashboard Layout control +description: Learn here all about Adaptive Layout in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Adaptive Layout publishingplatform: ##Platform_Name## @@ -13,7 +13,7 @@ documentation: ug The control is provided with built-in responsive support, where panels within the layout get adjusted based on their parent element's dimensions to accommodate any resolution which relieves the burden of building responsive dashboards. -The dashboard layout is designed to automatically adapt with lower resolutions by transforming the entire layout into a stacked one, so that the panels will be displayed in a vertical column. By default, whenever the screen resolution meets 600px or lower resolutions this layout transformation occurs. This transformation can be modified for any user defined resolution by defining the [`mediaQuery`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~MediaQuery.html) property of the component. +The Dashboard Layout is designed to automatically adapt with lower resolutions by transforming the entire layout into a stacked one, so that the panels will be displayed in a vertical column. By default, whenever the screen resolution meets 600px or lower resolutions this layout transformation occurs. This transformation can be modified for any user defined resolution by defining the [`mediaQuery`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~MediaQuery.html) property of the control. The following sample demonstrates the usage of the [`mediaQuery`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~MediaQuery.html) property to turn out the layout into a stacked one in user defined resolution. Here, whenever the window size reaches 700px or lesser, the layout becomes a stacked layout. @@ -23,8 +23,8 @@ The following sample demonstrates the usage of the [`mediaQuery`](https://help.s {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/adaptive-layout/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/adaptive-layout/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/adaptive-layout/CSHTML.cs %} {% endhighlight %} {% endtabs %} diff --git a/ej2-asp-core-mvc/dashboard-layout/configuring-layout.md b/ej2-asp-core-mvc/dashboard-layout/configuring-layout.md index 1eb673f4eb..d7199a4c9b 100644 --- a/ej2-asp-core-mvc/dashboard-layout/configuring-layout.md +++ b/ej2-asp-core-mvc/dashboard-layout/configuring-layout.md @@ -1,7 +1,7 @@ --- layout: post -title: Configuring Layout in ##Platform_Name## Dashboard Layout Component -description: Learn here all about Configuring Layout in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Configuring Layout in ##Platform_Name## Dashboard Layout control +description: Learn here all about Configuring Layout in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Configuring Layout publishingplatform: ##Platform_Name## @@ -13,7 +13,7 @@ documentation: ug The entire layout dimensions are assigned based on the height and width of the parent element. Hence, a responsive or static layout can be created by assigning a percentage or static dimension values to the parent element. The layout adapts to mobile resolutions by transforming the entire layout into a stacked orientation, so that, the panels will be displayed in a vertical column. -The **Dashboard Layout** is a grid structured component which can be split into subsections of equal size known as cells. The total number of cells in each row is defined by using the [`columns`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~Columns.html) property of the component. The width of each cell will be auto calculated based on the total number of cells placed in a row and the height of a cell will be same as that of its width. However, the height of these cells can also be configured to any desired size using the [`cellAspectRatio`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~CellAspectRatio.html) property (cellwidth/cellheight ratio) which defines the cell width to height ratio. +The **Dashboard Layout** is a grid structured control which can be split into subsections of equal size known as cells. The total number of cells in each row is defined by using the [`columns`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~Columns.html) property of the control. The width of each cell will be auto calculated based on the total number of cells placed in a row and the height of a cell will be same as that of its width. However, the height of these cells can also be configured to any desired size using the [`cellAspectRatio`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~CellAspectRatio.html) property (cellwidth/cellheight ratio) which defines the cell width to height ratio. The number of rows within the layout has no limits and can have any number of rows based on the panels count and position. Panels which acts as data containers will be placed or positioned over these cells. @@ -29,8 +29,8 @@ The following sample demonstrates how to modify a cell size using the [`columns` {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/modifying-cell-size/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/modifying-cell-size/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/modifying-cell-size/CSHTML.cs %} {% endhighlight %} {% endtabs %} @@ -60,8 +60,8 @@ The following sample demonstrates the usage of the [`cellSpacing`](https://help. {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/cell-spacing/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/cell-spacing/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/cell-spacing/CSHTML.cs %} {% endhighlight %} {% endtabs %} @@ -91,8 +91,8 @@ In the following sample, the gridlines indicate the cells split-up of the layout {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/graphical-representation/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/graphical-representation/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/graphical-representation/CSHTML.cs %} {% endhighlight %} {% endtabs %} @@ -111,7 +111,7 @@ In the following sample, the gridlines indicate the cells split-up of the layout ![Graphical representation of the layout](./images/graphical_representation.PNG) -## Rendering component in right-to-left direction +## Rendering control in right-to-left direction It is possible to render the Dashboard Layout in right-to-left direction by setting the [enableRtl](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~EnableRtl.html) API to true. @@ -121,8 +121,8 @@ It is possible to render the Dashboard Layout in right-to-left direction by sett {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/rtl/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/rtl/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/rtl/CSHTML.cs %} {% endhighlight %} {% endtabs %} diff --git a/ej2-asp-core-mvc/dashboard-layout/floating-panel.md b/ej2-asp-core-mvc/dashboard-layout/floating-panel.md index 0b809d3617..73e58fed5b 100644 --- a/ej2-asp-core-mvc/dashboard-layout/floating-panel.md +++ b/ej2-asp-core-mvc/dashboard-layout/floating-panel.md @@ -1,7 +1,7 @@ --- layout: post -title: Floating Panel in ##Platform_Name## Dashboard Layout Component -description: Learn here all about Floating Panel in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Floating Panel in ##Platform_Name## Dashboard Layout control +description: Learn here all about Floating Panel in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Floating Panel publishingplatform: ##Platform_Name## @@ -11,9 +11,9 @@ documentation: ug # Floating panels -The floating functionality of the component allows to effectively use the entire layout for the panel's placement. If the floating functionality is enabled, the panels within the layout get floated upwards automatically to occupy the empty cells available in previous rows. This functionality can be enabled or disabled using the [`allowFloating`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~AllowFloating.html) property of the component. +The floating functionality of the control allows to effectively use the entire layout for the panel's placement. If the floating functionality is enabled, the panels within the layout get floated upwards automatically to occupy the empty cells available in previous rows. This functionality can be enabled or disabled using the [`allowFloating`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~AllowFloating.html) property of the control. -The following sample demonstrates how to enable or disable the floating of panels in the DashboardLayout component using [`allowFloating`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~AllowFloating.html) property. +The following sample demonstrates how to enable or disable the floating of panels in the DashboardLayout control using [`allowFloating`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~AllowFloating.html) property. {% if page.publishingplatform == "aspnet-core" %} @@ -21,8 +21,8 @@ The following sample demonstrates how to enable or disable the floating of panel {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/floating-panels/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/floating-panels/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/floating-panels/CSHTML.cs %} {% endhighlight %} {% endtabs %} diff --git a/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/dragging-of-panels.md b/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/dragging-of-panels.md index 87ae013e59..a4f85008ab 100644 --- a/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/dragging-of-panels.md +++ b/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/dragging-of-panels.md @@ -1,7 +1,7 @@ --- layout: post -title: Dragging Of Panels in ##Platform_Name## Dashboard Layout Component | Syncfusion -description: Learn here all about Dragging Of Panels in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Dragging Of Panels in ##Platform_Name## Dashboard Layout control | Syncfusion +description: Learn here all about Dragging Of Panels in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Dragging Of Panels publishingplatform: ##Platform_Name## @@ -9,13 +9,13 @@ documentation: ug --- -# Dragging of Panels in ##Platform_Name## Dashboard Layout Component +# Dragging of Panels in ##Platform_Name## Dashboard Layout control -The Dashboard Layout component is provided with dragging functionality to drag and reorder the panels within the layout. While dragging a panel, a holder will be highlighted below the panel indicating the panel placement on panel drop. This helps the user to decide whether to place the panel in the current position or revert to previous position without disturbing the layout. +The Dashboard Layout control is provided with dragging functionality to drag and reorder the panels within the layout. While dragging a panel, a holder will be highlighted below the panel indicating the panel placement on panel drop. This helps the user to decide whether to place the panel in the current position or revert to previous position without disturbing the layout. If one or more panels collide while dragging, then the colliding panels will be pushed towards the left or right or top or bottom direction where an adaptive space for the collided panel is available. The position changes of these collided panels will be updated dynamically during dragging of a panel, so the user can conclude whether to place the panel in the current position or not. -While dragging a panel in Dashboard layout the following dragging events will be triggered, +While dragging a panel in Dashboard Layout the following dragging events will be triggered, * [`dragStart`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~DragStart.html) - Triggers when panel drag starts * [`drag`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~Drag.html) - Triggers when panel is being dragged * [dragStop](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~DragStop.html) - Triggers when panel drag stops @@ -28,8 +28,8 @@ The following sample demonstrates dragging and pushing of panels. For example, w {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/drag-and-drop/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/drag-and-drop/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/drag-and-drop/CSHTML.cs %} {% endhighlight %} {% endtabs %} @@ -60,8 +60,8 @@ The following sample demonstrates customizing the dragging handler of the panels {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/dragging-handler/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/dragging-handler/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/dragging-handler/CSHTML.cs %} {% endhighlight %} {% endtabs %} diff --git a/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/moving-panels.md b/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/moving-panels.md index 837ffa2570..1fa8eacc7a 100644 --- a/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/moving-panels.md +++ b/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/moving-panels.md @@ -1,7 +1,7 @@ --- layout: post -title: Moving Panels in ##Platform_Name## Dashboard Layout Component -description: Learn here all about Moving Panels in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Moving Panels in ##Platform_Name## Dashboard Layout control +description: Learn here all about Moving Panels in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Moving Panels publishingplatform: ##Platform_Name## @@ -33,8 +33,8 @@ The following sample demonstrates moving a panel programatically to a new positi {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/moving/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/moving/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/moving/CSHTML.cs %} {% endhighlight %} {% endtabs %} diff --git a/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/resizing-of-panels.md b/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/resizing-of-panels.md index b0074cdf63..17af02a431 100644 --- a/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/resizing-of-panels.md +++ b/ej2-asp-core-mvc/dashboard-layout/interaction-with-panels/resizing-of-panels.md @@ -1,7 +1,7 @@ --- layout: post -title: Resizing Of Panels in ##Platform_Name## Dashboard Layout Component -description: Learn here all about Resizing of Panels in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Resizing Of Panels in ##Platform_Name## Dashboard Layout control +description: Learn here all about Resizing of Panels in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Resizing Of Panels publishingplatform: ##Platform_Name## @@ -11,11 +11,11 @@ documentation: ug # Resizing of panels -The DashboardLayout component is also provided with the panel resizing functionality which can be enabled or disabled using the [`allowResizing`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~AllowResizing.html) property. This functionality allows you to resize the panels dynamically through UI interactions using the resizing handlers, which controls the panel resizing in various directions. +The DashboardLayout control is also provided with the panel resizing functionality which can be enabled or disabled using the [`allowResizing`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~AllowResizing.html) property. This functionality allows you to resize the panels dynamically through UI interactions using the resizing handlers, which controls the panel resizing in various directions. Initially, the panels can be resized only in south-east direction. However, panels can also be resized in east, west, north, south, and south-west directions by defining the required directions with the [`resizableHandles`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~ResizableHandles.html) property. -On resizing a panel in Dashboard layout the following events will be triggered, +On resizing a panel in Dashboard Layout the following events will be triggered, * [resizeStart](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~ResizeStart.html) - Triggers when panel resize starts * [resize](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~Resize.html) - Triggers when panel is being resized * [resizeStop](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayout~ResizeStop.html) - Triggers when panel resize stops @@ -26,8 +26,8 @@ On resizing a panel in Dashboard layout the following events will be triggered, {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/resizing-panels/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/resizing-panels/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/resizing-panels/CSHTML.cs %} {% endhighlight %} {% endtabs %} @@ -67,8 +67,8 @@ The following sample demonstrates resizing panels programatically in the Dashboa {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/resize-panel/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/resize-panel/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/resize-panel/CSHTML.cs %} {% endhighlight %} {% endtabs %} diff --git a/ej2-asp-core-mvc/dashboard-layout/overview.md b/ej2-asp-core-mvc/dashboard-layout/overview.md index 9045018df3..00c0562fbd 100644 --- a/ej2-asp-core-mvc/dashboard-layout/overview.md +++ b/ej2-asp-core-mvc/dashboard-layout/overview.md @@ -1,7 +1,7 @@ --- layout: post -title: Overview in ##Platform_Name## Dashboard Layout Component -description: Learn here all about Overview in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Overview in ##Platform_Name## Dashboard Layout control +description: Learn here all about Overview in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Index publishingplatform: ##Platform_Name## @@ -10,7 +10,7 @@ documentation: ug # Overview -The **DashboardLayout** is a grid structured layout control that helps to create a dashboard with panels. Panels hold the UI components and allows to resize, reorder, drag-n-drop, remove and add options. This allows users to easily place the components at the desired position within the grid layout. +The **DashboardLayout** is a grid structured layout control that helps to create a dashboard with panels. Panels hold the UI controls and allows to resize, reorder, drag-n-drop, remove and add options. This allows users to easily place the controls at the desired position within the grid layout. ## Key features diff --git a/ej2-asp-core-mvc/dashboard-layout/panels/add-remove-panels.md b/ej2-asp-core-mvc/dashboard-layout/panels/add-remove-panels.md index e7427c23cf..5a76b191d1 100644 --- a/ej2-asp-core-mvc/dashboard-layout/panels/add-remove-panels.md +++ b/ej2-asp-core-mvc/dashboard-layout/panels/add-remove-panels.md @@ -1,7 +1,7 @@ --- layout: post -title: Add Remove Panels in ##Platform_Name## Dashboard Layout Component -description: Learn here all about how to add or remove panels in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Add Remove Panels in ##Platform_Name## Dashboard Layout control +description: Learn here all about how to add or remove panels in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Add Remove Panels publishingplatform: ##Platform_Name## @@ -11,7 +11,7 @@ documentation: ug # Adding and removing panels dynamically -In real-time cases, the data being presented within the dashboard should be updated frequently which includes adding or removing the data dynamically within the dashboard. This can be easily achieved by using the `addPanel` and `removePanel` public methods of the component. +In real-time cases, the data being presented within the dashboard should be updated frequently which includes adding or removing the data dynamically within the dashboard. This can be easily achieved by using the `addPanel` and `removePanel` public methods of the control. ## Add or remove panels dynamically @@ -24,7 +24,7 @@ dashboard.removeAll(); ``` -The following sample demonstrates how to add and remove the panels dynamically in the dashboard layout component. Here, panels can be added in any desired position of required size by selecting them in the numeric boxes and clicking add button and remove them by selecting the ID of the panel. +The following sample demonstrates how to add and remove the panels dynamically in the Dashboard Layout control. Here, panels can be added in any desired position of required size by selecting them in the numeric boxes and clicking add button and remove them by selecting the ID of the panel. {% if page.publishingplatform == "aspnet-core" %} diff --git a/ej2-asp-core-mvc/dashboard-layout/panels/position-sizing-of-panels.md b/ej2-asp-core-mvc/dashboard-layout/panels/position-sizing-of-panels.md index 943f685a80..928f9f7e76 100644 --- a/ej2-asp-core-mvc/dashboard-layout/panels/position-sizing-of-panels.md +++ b/ej2-asp-core-mvc/dashboard-layout/panels/position-sizing-of-panels.md @@ -1,7 +1,7 @@ --- layout: post -title: Position Sizing Of Panels in ##Platform_Name## Dashboard Layout Component -description: Learn here all about Position Sizing of Panels in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Position Sizing Of Panels in ##Platform_Name## Dashboard Layout control +description: Learn here all about Position Sizing of Panels in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Position Sizing Of Panels publishingplatform: ##Platform_Name## @@ -11,7 +11,7 @@ documentation: ug # Panels -Panels are the basic building blocks of the dashboard layout component. They act as a container for the data to be visualized or presented. These panels can be positioned or resized for effective presentation of the data. +Panels are the basic building blocks of the Dashboard Layout control. They act as a container for the data to be visualized or presented. These panels can be positioned or resized for effective presentation of the data. The below table represents all the available panel properties and the corresponding functionalities @@ -40,8 +40,8 @@ The panels within the layout can be easily positioned or ordered using the [`row {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/panel-position/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/panel-position/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/panel-position/CSHTML.cs %} {% endhighlight %} {% endtabs %} @@ -69,8 +69,8 @@ A panel's size can be varied easily by defining the [`sizeX`](https://help.syncf {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/panel-size/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/panel-size/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/panel-size/CSHTML.cs %} {% endhighlight %} {% endtabs %} diff --git a/ej2-asp-core-mvc/dashboard-layout/panels/setting-header-of-panels.md b/ej2-asp-core-mvc/dashboard-layout/panels/setting-header-of-panels.md index 13284703ae..6299b47757 100644 --- a/ej2-asp-core-mvc/dashboard-layout/panels/setting-header-of-panels.md +++ b/ej2-asp-core-mvc/dashboard-layout/panels/setting-header-of-panels.md @@ -1,7 +1,7 @@ --- layout: post -title: Setting Header Of Panels in ##Platform_Name## Dashboard Layout Component -description: Learn here all about Setting Header of Panels in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Setting Header Of Panels in ##Platform_Name## Dashboard Layout control +description: Learn here all about Setting Header of Panels in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Setting Header Of Panels publishingplatform: ##Platform_Name## @@ -11,7 +11,7 @@ documentation: ug # Header and content of panels -The dashboard layout component is mostly used to represent the data used for monitoring or managing a process. These data or any HTML template can be placed as the [`content`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayoutPanel~Content.html) of a panel using the content property. Also, word or phrase that summarize the panel’s content can be added as the header on the top of each panel using the [`header`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayoutPanel~Header.html) property of the panel. +The Dashboard Layout control is mostly used to represent the data used for monitoring or managing a process. These data or any HTML template can be placed as the [`content`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayoutPanel~Content.html) of a panel using the content property. Also, word or phrase that summarize the panel’s content can be added as the header on the top of each panel using the [`header`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayoutPanel~Header.html) property of the panel. {% if page.publishingplatform == "aspnet-core" %} @@ -19,8 +19,8 @@ The dashboard layout component is mostly used to represent the data used for mon {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/content-panel/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/content-panel/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/content-panel/CSHTML.cs %} {% endhighlight %} {% endtabs %} @@ -40,11 +40,11 @@ The dashboard layout component is mostly used to represent the data used for mon ## Placing components as content -In a dashboard, components like charts, grids, maps, gauges, and more can be used to present complex data. Such components can be placed as the panel content by assigning the corresponding component element as the `content template` of the panel. +In a dashboard, controls like charts, grids, maps, gauges, and more can be used to present complex data. Such controls can be placed as the panel content by assigning the corresponding control element as the `content template` of the panel. -N> You must assign the empty div element inside the content template to add the component as content and also define the .e-panel, .e-panel-container, .e-panel-header, and .e-panel-content classes while rendering the DashboardLayout component using content template. +N> You must assign the empty div element inside the content template to add the control as content and also define the .e-panel, .e-panel-container, .e-panel-header, and .e-panel-content classes while rendering the DashboardLayout control using content template. -The following sample demonstrates how to add ej2-chart components as the [`content`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayoutPanel~Content.html) for each panel in the DashboardLayout component. +The following sample demonstrates how to add ej2-chart controls as the [`content`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Layouts.DashboardLayoutPanel~Content.html) for each panel in the DashboardLayout control. {% if page.publishingplatform == "aspnet-core" %} @@ -52,8 +52,8 @@ The following sample demonstrates how to add ej2-chart components as the [`conte {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/dashboard-layout/placing-content/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="HomeController.cs" %} -{% include code-snippet/dashboard-layout/placing-content/HomeController.cs %} +{% highlight c# tabtitle="CSHTML.cs" %} +{% include code-snippet/dashboard-layout/placing-content/CSHTML.cs %} {% endhighlight %} {% endtabs %} diff --git a/ej2-asp-core-mvc/dashboard-layout/state-maintenance.md b/ej2-asp-core-mvc/dashboard-layout/state-maintenance.md index be34234031..c69c12e474 100644 --- a/ej2-asp-core-mvc/dashboard-layout/state-maintenance.md +++ b/ej2-asp-core-mvc/dashboard-layout/state-maintenance.md @@ -1,7 +1,7 @@ --- layout: post -title: State Maintenance in ##Platform_Name## Dashboard Layout Component -description: Learn here all about State Maintenance in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: State Maintenance in ##Platform_Name## Dashboard Layout control +description: Learn here all about State Maintenance in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: State Maintenance publishingplatform: ##Platform_Name## @@ -11,7 +11,7 @@ documentation: ug # Panel state maintenance -The current layout structure of the Dashboard Layout component can be obtained and saved to construct another dashboard with same panel structure using the `serialize` public method of the component. This method returns the component's current panel setting which can be used to construct a dashboard with the same layout settings. +The current layout structure of the Dashboard Layout control can be obtained and saved to construct another dashboard with same panel structure using the `serialize` public method of the control. This method returns the control's current panel setting which can be used to construct a dashboard with the same layout settings. The following sample demonstrates how to save and restore the state of the panels using the serialize method. Click Save to store the panel's settings and click Restore to restore the previously saved panel settings. diff --git a/ej2-asp-core-mvc/dashboard-layout/style.md b/ej2-asp-core-mvc/dashboard-layout/style.md index a51e44197d..6e9604d812 100644 --- a/ej2-asp-core-mvc/dashboard-layout/style.md +++ b/ej2-asp-core-mvc/dashboard-layout/style.md @@ -1,7 +1,7 @@ --- layout: post -title: Style in ##Platform_Name## Dashboard Layout Component -description: Learn here all about Style in Syncfusion ##Platform_Name## Dashboard Layout component of Syncfusion Essential JS 2 and more. +title: Style in ##Platform_Name## Dashboard Layout control +description: Learn here all about Style in Syncfusion ##Platform_Name## Dashboard Layout control of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Style publishingplatform: ##Platform_Name## @@ -13,9 +13,9 @@ documentation: ug The following content provides the exact CSS structure that can be used to modify the control's appearance based on the user preference. -## Customizing the dashboard layout panel header +## Customizing the Dashboard Layout panel header -Use the following CSS to customize the dashboard layout panel header. +Use the following CSS to customize the Dashboard Layout panel header. ```css .e-dashboardlayout.e-control .e-panel .e-panel-container .e-panel-header { @@ -25,9 +25,9 @@ Use the following CSS to customize the dashboard layout panel header. } ``` -## Customizing the dashboard layout panel content +## Customizing the Dashboard Layout panel content -Use the following CSS to customize the dashboard layout panel content. +Use the following CSS to customize the Dashboard Layout panel content. ```css .e-dashboardlayout.e-control .e-panel .e-panel-container .e-panel-content { @@ -36,9 +36,9 @@ Use the following CSS to customize the dashboard layout panel content. } ``` -## Customizing the dashboard layout panel resize icon +## Customizing the Dashboard Layout panel resize icon -Use the following CSS to customize the dashboard layout resize icon. +Use the following CSS to customize the Dashboard Layout resize icon. ```css .e-dashboardlayout.e-control .e-panel .e-panel-container .e-resize.e-double{ @@ -49,9 +49,9 @@ Use the following CSS to customize the dashboard layout resize icon. } ``` -## Customizing the dashboard layout panel background +## Customizing the Dashboard Layout panel background -Use the following CSS to customize the dashboard layout panel background. +Use the following CSS to customize the Dashboard Layout panel background. ```css .e-dashboardlayout.e-control.e-responsive { diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/column-rendering.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/column-rendering.md index edc43b0973..578b05ad54 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/column-rendering.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/column-rendering.md @@ -216,3 +216,37 @@ In the below example, we have used the `expand` query to load the nested Employe {% endtabs %} ![Using remote data](../images/column-rendering/column-render-remote.png) + +### Complex data binding with list of array of objects + +The Syncfusion® Grid supports complex data binding with lists of arrays of objects. This feature allows you to bind complex data with multiple levels of nested objects and arrays to the Grid. + +The following example shows how to set complex field for datasource having array of objects. + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/columns/column-complexbinding/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Complexbinding.cs" %} +{% include code-snippet/grid/columns/column-complexbinding/complexbinding.cs %} +{% endhighlight %} +{% endtabs %} + +![Complex data binding with list of array of objects](../images/column-rendering/column-complex.png) + +### How to set complex column as foreign key column + +The Syncfusion® Grid control provides the ability to set complex columns as foreign key columns. This allows you to display related data from a foreign data source based on the complex column value. + +The following example demonstrates how to set the **Employee.EmployeeID** column as a foreign key column, and display the **FirstName** column from the foreign data. + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/grid/columns/foreignkey/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Foreignkey.cs" %} +{% include code-snippet/grid/columns/foreignkey/foreignkey.cs %} +{% endhighlight %} +{% endtabs %} + +![Complex data binding with list of array of objects](../images/column-rendering/column-foriegn-complex.png) \ No newline at end of file diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/command-column-editing.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/command-column-editing.md index 8a9322506a..a366f717dc 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/command-column-editing.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/command-column-editing.md @@ -8,12 +8,13 @@ publishingplatform: ##Platform_Name## documentation: ug --- +# Command column editing in ASP.NET MVC Grid component -# Command Column Editing +The command column editing feature allows you to add CRUD (Create, Read, Update, Delete) action buttons in a column for performing operations on individual rows.This feature is commonly used when you need to enable inline editing, deletion, or saving of row changes directly within the grid. -The command column provides an option to add CRUD action buttons in a column. This can be defined by the [`Commands`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Commands) property of [`Column`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html). +To enable command column editing, you can utilize the `Column.Commands` property. By defining this property, you can specify the command buttons to be displayed in the command column, such as Edit, Delete, Save, and Cancel. -The available built-in command buttons are: +The available built-in command buttons are: | Command Button | Actions | |----------------|---------| @@ -22,55 +23,34 @@ The available built-in command buttons are: | Save | Update the edited row.| | Cancel | Cancel the edited state. | -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/commandcolumn/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Commandcolumn.cs" %} -{% include code-snippet/grid/edit/commandcolumn/commandcolumn.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} +Here's an example that demonstrates how to add CRUD action buttons in a column using the `Commands` column property : {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/grid/edit/commandcolumn/razor %} {% endhighlight %} -{% highlight c# tabtitle="Commandcolumn.cs" %} +{% highlight c# tabtitle="commandcolumn.cs" %} {% include code-snippet/grid/edit/commandcolumn/commandcolumn.cs %} {% endhighlight %} {% endtabs %} -{% endif %} - +![Command column editing](../images/editing/edit-command.gif) ## Custom command column -The custom command buttons can be added in a column by using the [`Commands`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Commands) property of [`Column`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html) and the action for the custom buttons can be defined using **commandClick** event. - -{% if page.publishingplatform == "aspnet-core" %} +The custom command column feature in the Grid component allows you to add custom command buttons in a column to perform specific actions on individual rows. This feature is particularly useful when you need to provide customized functionality for editing, deleting, or performing any other operation on a row. -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/customcommand/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Customcommand.cs" %} -{% include code-snippet/grid/edit/customcommand/customcommand.cs %} -{% endhighlight %} -{% endtabs %} +To add custom command buttons in a column, you can utilize the `Column.Commands` property. Furthermore, you can define the actions associated with these custom buttons using the [CommandClick](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_CommandClick) event. -{% elsif page.publishingplatform == "aspnet-mvc" %} +Here's an example that demonstrates how to add custom command buttons using the `Commands` property and customize the button click behavior to display grid details in a dialog using the `CommandClick` event: {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/grid/edit/customcommand/razor %} {% endhighlight %} -{% highlight c# tabtitle="Customcommand.cs" %} +{% highlight c# tabtitle="customcommand.cs" %} {% include code-snippet/grid/edit/customcommand/customcommand.cs %} {% endhighlight %} {% endtabs %} -{% endif %} +![Custom command column](../images/editing/edit-custom.png) \ No newline at end of file diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/dialog-editing.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/dialog-editing.md index 228d6014ee..2559102b33 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/dialog-editing.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/dialog-editing.md @@ -8,23 +8,13 @@ publishingplatform: ##Platform_Name## documentation: ug --- +# Dialog editing in ASP.NET MVC Grid component -# Dialog Editing in ##Platform_Name## Grid Component +Dialog editing is a feature in the Grid component that allows you to edit the data of the currently selected row using a dialog window. With dialog editing, you can easily modify cell values and save the changes back to the data source.This feature is particularly beneficial in scenarios where you need to quickly modify data without navigating to a separate page or view, and it streamlines the process of editing multiple cells. -In dialog edit mode, when you start editing the currently selected row data will be shown on a dialog. You can change the cell values and save edited data to the data source. To enable Dialog edit, set the [`Mode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) of [`EditSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html) as **Dialog**. +To enable dialog editing in grid component, you need to set the [EditSettings.Mode](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property to **Dialog**. This property determines the editing mode for the grid, and when set to **Dialog**, it enables the dialog editing feature. -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/dialog/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/dialog/dialog.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} +Here's an example how to enable dialog editing in the ASP.NET MVC grid component: {% tabs %} {% highlight razor tabtitle="CSHTML" %} @@ -34,35 +24,18 @@ In dialog edit mode, when you start editing the currently selected row data will {% include code-snippet/grid/edit/dialog/dialog.cs %} {% endhighlight %} {% endtabs %} -{% endif %} - +![Dialog editing](../images/editing/dialog-edit.png) ## Customize edit dialog -You can customize the appearance of the edit dialog in the [`ActionComplete`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridBuilder-1.html#Syncfusion_EJ2_Grids_GridBuilder_1_ActionComplete_System_String_) event based on **requestType** as **beginEdit** or **add**. - -In the following example, the dialog's properties like header text, showCloseIcon, height have been changed while editing and adding the records. - -Also the locale text for the **Save** and **Cancel** buttons has been changed by overriding the default locale strings. - -You can refer the Grid [`Default text`](../global-local/) list for more localization. +The edit dialog in the Grid component allows you to customize its appearance and behavior based on the type of action being performed, such as editing or adding a record. You can modify properties like header text, showCloseIcon, and height to tailor the edit dialog to your specific requirements. Additionally, you can override default localization strings to provide custom text for buttons or other elements within the dialog. -{% if page.publishingplatform == "aspnet-core" %} +To customize the edit dialog, you need to handle the [ActionComplete](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event of the Grid component and perform the necessary modifications based on the **requestType** parameter. The **requestType** parameter identifies the type of action being performed, such as **beginEdit** for editing a record or **add** for adding a new record. -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/customizedialog/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/customizedialog/dialog.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/customizedialog/dialog.cs %} -{% endhighlight %} -{% endtabs %} +>You can refer the Grid [Default text](../global-local/) list for more localization. -{% elsif page.publishingplatform == "aspnet-mvc" %} +The following example that demonstrates how to customize the edit dialog using the `ActionComplete` event: {% tabs %} {% highlight razor tabtitle="CSHTML" %} @@ -71,39 +44,19 @@ You can refer the Grid [`Default text`](../global-local/) list for more localiza {% highlight c# tabtitle="Dialog.cs" %} {% include code-snippet/grid/edit/customizedialog/dialog.cs %} {% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/customizedialog/dialog.cs %} -{% endhighlight %} {% endtabs %} -{% endif %} +![Customize edit dialog](../images/editing/dialog-customize.png) - -> The Grid add or edit dialog element has the max-height property, which is calculated based on the available window height. So, in the normal window (1920 x 1080), it is possible to set the dialog’s height up to 658px. +> The Grid add or edit dialog element has the max-height property, which is calculated based on the available window height. So, in the normal window (1920 x 1080), it is possible to set the dialog's height up to 658px. ## Show or hide columns in dialog editing -The Grid has the option to show hidden columns or hide visible columns while editing in the dialog edit mode by using the [ActionBegin](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event of the Grid. - -In the `ActionBegin` event, when the `requestType` is `beginEdit` or `add`, the column will be shown or hidden using the [Visible](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Visible) property of [Column](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridColumn.html). When the `requestType` is `save`, the properties will be reset to their original state. - -In the following example, the CustomerID column is rendered as a hidden column, and the ShipCountry column is rendered as a visible column. In the edit mode, the CustomerID column will be changed to a visible state and the ShipCountry column will be changed to a hidden state. - -{% if page.publishingplatform == "aspnet-core" %} +The show or hide columns in dialog editing feature in the grid allows you to dynamically control the visibility of columns while editing in the dialog edit mode. This feature is useful when you want to display specific columns based on the type of action being performed, such as editing an existing record or adding a new record. To achieve this, you can utilize the [ActionBegin](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event of the Grid. -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/show-hide-edit-dialog/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs %} -{% endhighlight %} -{% endtabs %} +The `ActionBegin` event is triggered whenever an action is initiated in the grid, such as editing, adding, or deleting a record. Within the event handler, you can check the **requestType** parameter to determine the type of action being performed. If the **requestType** is `beginEdit` or `add`, you can modify the visibility of columns using the `Column.Visible` property. This property is used to determine whether a column should be displayed or hidden. Then, when the **requestType** is `save`, you can reset the column visibility to its initial state using the `Column.Visible` property. -{% elsif page.publishingplatform == "aspnet-mvc" %} +In the following example, the **CustomerID** column is rendered as a hidden column, and the **ShipCountry** column is rendered as a visible column. In the edit mode, the **CustomerID** column will be changed to a visible state and the **ShipCountry** column will be changed to a hidden state. {% tabs %} {% highlight razor tabtitle="CSHTML" %} @@ -112,35 +65,17 @@ In the following example, the CustomerID column is rendered as a hidden column, {% highlight c# tabtitle="Dialog.cs" %} {% include code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs %} {% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs %} -{% endhighlight %} {% endtabs %} -{% endif %} - +![Show or hide columns in dialog editing](../images/editing/dialog-show-hide.png) ## Use wizard like dialog editing -Wizard helps you create intuitive step-by-step forms to fill. You can achieve the wizard like editing by using the dialog template feature. It support your own editing template by defining [`Mode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) of [`EditSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html) as **Dialog** and [`Template`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) as SCRIPT element ID or HTML string which holds the template. - -The following example demonstrate the wizard like editing in the grid with the obtrusive Validation. +Wizard-like dialog editing is a powerful feature in the Grid component that enables the creation of intuitive step-by-step forms. This feature provides a structured approach to form completion or data entry by breaking down the process into manageable steps.This feature is particularly useful when you have complex forms that need to be broken down into smaller sections to guide you through the data entry process. -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/wizardediting/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/wizardediting/dialog.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/wizardediting/dialog.cs %} -{% endhighlight %} -{% endtabs %} +To achieve wizard-like dialog editing in the grid component, you can use the dialog template feature. This feature allows you to define your own custom editing template using the [EditSettings.Mode](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property set to **Dialog** and the [EditSettings.Template](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) property to specify the template variable that defines the editors for each step of the wizard. -{% elsif page.publishingplatform == "aspnet-mvc" %} +The following example demonstrate the wizard like editing in the grid with the unobtrusive validation. {% tabs %} {% highlight razor tabtitle="CSHTML" %} @@ -149,38 +84,23 @@ The following example demonstrate the wizard like editing in the grid with the o {% highlight c# tabtitle="Dialog.cs" %} {% include code-snippet/grid/edit/wizardediting/dialog.cs %} {% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/wizardediting/dialog.cs %} -{% endhighlight %} {% endtabs %} -{% endif %} +![Use wizard like dialog editing](../images/editing/dialog-tabs-multiple.gif) -## Customize Add/Edit Dialog footer +## Customize add/edit dialog footer -In dialog edit mode, a dialog will show up when editing the currently selected row or adding a new row. By default, you can save or cancel the edited changes by clicking the Save or Cancel button in the dialog's footer. Along with these buttons, it is possible to add a custom button in the footer section using the [ActionComplete](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridBuilder-1.html#Syncfusion_EJ2_Grids_GridBuilder_1_ActionComplete_System_String_) event of the Grid. +The Customize add/edit dialog footer feature in the grid allows you to modify the footer section of the dialog that appears when editing the currently selected row or adding a new row. By default, the dialog displays two buttons in the footer section: Save and Cancel, which allow you to save or discard the changes made in the dialog. This feature is particularly helpful when you want to add custom buttons to the dialog's footer, implement specific actions, or customize the appearance of the buttons, such as changing their color or size in the dialog's footer. This can be achieved using the [ActionComplete](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event of the Grid component. In the following sample, using the `dialog` argument of the `ActionComplete` event, the action for the custom button can be customized. -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/custombutton/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog-Footer.cs" %} -{% include code-snippet/grid/edit/custombutton/custombutton.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/grid/edit/custombutton/razor %} {% endhighlight %} -{% highlight c# tabtitle="Dialog-Footer.cs" %} +{% highlight c# tabtitle="custombutton.cs" %} {% include code-snippet/grid/edit/custombutton/custombutton.cs %} {% endhighlight %} {% endtabs %} -{% endif %} \ No newline at end of file + +![Customize add/edit dialog footer](../images/editing/dialog-footer.png) \ No newline at end of file diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/edit-types.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/edit-types.md index ffaf7144f8..4d665ad3d2 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/edit-types.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/edit-types.md @@ -122,6 +122,27 @@ The following sample code demonstrates the customization applied to DropDownList ![Customize dropdown edit type](../images/editing/dropdown-edit-type.png) +### Provide custom data source for DropDownList component + +In Syncfusion® Grid component, you have an option to provide a custom data source for the [DropDownList](https://ej2.syncfusion.com/aspnetmvc/documentation/drop-down-list/getting-started) component in the edit form. This feature allows you to define a specific set of values for the DropDownList. + +To achieve this, you can utilize the `Columns->Edit->Params` property. This property allows you to define the edit params for the column within the grid. + +When setting a new data source using the edit params, you need to specify a new [Query](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_Query) property for the DropDownList. The `Query` property allows you to define custom queries for data retrieval and filtering. + +In the below demo, DropDownList is rendered with custom data source for the **ShipCountry** column : + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/custom-data-params/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Dropdownlist-params.cs" %} +{% include code-snippet/grid/edit/custom-data-params/dropdown-params.cs %} +{% endhighlight %} +{% endtabs %} + +![Provide custom data source for DropDownList component](../images/editing/dropdown-edit-type.png) + ### Apply filtering for DropDownList component The Syncfusion® Grid component provides filtering for the DropDownList within the edit form. This feature allows to select options from a predefined list and easily search for specific items using the built-in filtering feature. @@ -456,6 +477,25 @@ The following example demonstrates how to render a RichTextEditor component in t ![Render richtext editor component](../images/editing/render-richtext-editor.gif) +### Render Upload component in edit form + +The Syncfusion Grid allows you to render an Upload control within the Grid's edit form. This feature is especially valuable when you need to upload and manage files or images in a specific column during data editing. + +To render Upload control in edit form, you need to define a cell edit template for the column using `edit` property. The **edit** property specifies the cell edit template that used as an editor for a particular column. + +The following example demonstrates how to render a Upload control in the **Employee Image** column of the Syncfusion Grid. The [ActionBegin](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event is handled to update the edited value in the grid when the save button is clicked: + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/edit-upload/razor %} +{% endhighlight %} +{% highlight c# tabtitle="upload.cs" %} +{% include code-snippet/grid/edit/edit-upload/upload.cs %} +{% endhighlight %} +{% endtabs %} + +![Render Upload component in edit form](../images/editing/edit-types-upload.gif) + ### Render AutoComplete component in edit form The Syncfusion® Grid allows you to render the AutoComplete component within the edit form by using the cell edit template feature.This feature enables you to select values from a predefined list during the editing of a specific column. It is especially valuable when you need to provide a dropdown-like auto-suggestion and input assistance for data entry in the Grid's columns. diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/template-editing.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/template-editing.md index 74e4c45c0e..b37c5f0233 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/template-editing.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/template-editing.md @@ -8,81 +8,99 @@ publishingplatform: ##Platform_Name## documentation: ug --- +# Template editing in ASP.NET MVC Grid component -# Template Editing +The Syncfusion ASP.NET MVC Grid component supports template editing, providing a powerful and flexible way to customize the appearance and behavior of cells during editing. This feature allows you to use ASP.NET MVC templates to define the structure and content of the cells within the grid. -## Inline or dialog template editing +## Inline or dialog template editing -The dialog template editing provides an option to customize the default behavior of dialog editing. Using the dialog template, you can render your own editors by defining the [`Mode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) of [`EditSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html) as **Dialog/Inline** and [`Template`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) as SCRIPT element ID or HTML string which holds the template. +The Syncfusion Grid provides support for inline and dialog template editing, allowing you to customize the editing using `Forms`. These forms can be utilized to add and update grid records. -In some cases, you need to add the new field editors in the dialog which are not present in the column model. In that situation, the template will help you to customize the default edit dialog. +To enable this feature, you need to set the [EditSettings.Mode](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property of the Grid to either **Normal** or **Dialog** and define the grid editors using [EditSetting.Template](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template). -In the below code example, demonstrate the usage of binding a partial view in the dialog template. +**Using Forms** -{% if page.publishingplatform == "aspnet-core" %} +Forms is a approach to create and manipulate the form controls. You can use form to add and update grid records. To use forms for editing operation, you can take leverage of the template support of dialog or inline edit mode. Setting the [EditSettings.Mode](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) as **Normal/Dialog** and use [EditSetting.Template](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) property to specify a SCRIPT element ID or an HTML string that holds the template. -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/dialogtemplate/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Addpatial.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/addpatial.cs %} -{% endhighlight %} -{% highlight c# tabtitle="AddpatialMVC.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/addpatialMVC.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/dialog.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialogtemplatemodel.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/dialogtemplatemodel.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Editpartial.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/editpartial.cs %} -{% endhighlight %} -{% highlight c# tabtitle="EditpartialMVC.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/editpartialMVC.cs %} -{% endhighlight %} -{% endtabs %} +In some cases, you want to add new field editors in the dialog which are not present in the column model. In that situation the dialog template will help us to customize the default edit dialog. -{% elsif page.publishingplatform == "aspnet-mvc" %} +In the following sample, grid enabled with dialog template editing. {% tabs %} -{% highlight razor tabtitle="CSHTML" %} +{% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/grid/edit/dialogtemplate/razor %} {% endhighlight %} -{% highlight c# tabtitle="Addpatial.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/addpatial.cs %} -{% endhighlight %} -{% highlight c# tabtitle="AddpatialMVC.cs" %} +{% highlight c# tabtitle="AddPartial.cshtml" %} {% include code-snippet/grid/edit/dialogtemplate/addpatialMVC.cs %} {% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} +{% highlight c# tabtitle="EditPartial.cshtml" %} +{% include code-snippet/grid/edit/dialogtemplate/editpartialMVC.cs %} +{% endhighlight %} +{% highlight c# tabtitle="dialogData.cs" %} {% include code-snippet/grid/edit/dialogtemplate/dialog.cs %} {% endhighlight %} -{% highlight c# tabtitle="Dialogtemplatemodel.cs" %} +{% highlight c# tabtitle="DialogTemplateModel.cs" %} {% include code-snippet/grid/edit/dialogtemplate/dialogtemplatemodel.cs %} {% endhighlight %} -{% highlight c# tabtitle="Editpartial.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/editpartial.cs %} -{% endhighlight %} -{% highlight c# tabtitle="EditpartialMVC.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/editpartialMVC.cs %} -{% endhighlight %} {% endtabs %} -{% endif %} +| Add | Edit | +| -------------- | ------------- | +| ![Add](../images/editing/template-inline-add.png) | ![Edit](../images/editing/template-inline-edit.png) | + +> The template form editors should have **name** attribute. + +## Using template context + +You can enhance the customization of your grid's edit forms by utilizing template contexts, such as accessing row details inside template, rendering editors as components, getting values from editors, setting focus to editors, and disabling default form validation, and adding custom validation. These features are applicable in both **inline** and **dialog** editing modes. + +The following template context topics are demonstrated through a practical example in the [Render tab component inside the dialog template](https://ej2.syncfusion.com/aspnetmvc/documentation/grid/editing/template-editing#render-tab-component-inside-the-dialog-template) topic. + +### Access row details inside template using template context + +When utilizing edit templates in the Grid , you can access crucial row information within an template when utilizing edit templates. This enables dynamic binding of attributes, values, or elements based on the specific row being edited. This is particularly useful for conditionally rendering or modifying elements in the edit template based on the row's state. + +The following properties will be available at the time of template execution: + +| Property Name | Usage | +|---------------|-------| +| isAdd | A Boolean property that defines whether the current row is a new record or not. | + +The following code example demonstrates the usage of the `IsAdd` property in an edit template to disable the **OrderID** textbox when it's not a new record: + +```ts + +``` + +### Render editors as components + +The Syncfusion Grid provides a powerful feature that allows you to dynamically render Syncfusion EJ2 controls as form editors during the editing process. This functionality is particularly useful when you want to provide feature-rich controls for data entry within the edit form. +To achieve this by utilizing the [ActionComplete](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event of the Grid and specifying `requestType` as **beginEdit** or **add**. -N> The Dialog/Inline template form editors should have **name** attribute. +The following code example illustrates rendering the [DropDownList](https://ej2.syncfusion.com/aspnetmvc/documentation/drop-down-list/getting-started) component in the `ActionComplete` event. -## Get value from editor +```js -You can read, format and update the current editor value in the [`ActionBegin`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin)event at the time of **requestType** as **save**. + function actionComplete(args) { + if ((args.requestType === 'beginEdit' || args.requestType === 'add')) { + var countryData = ej.data.DataUtil.distinct(@Html.Raw(JsonConvert.SerializeObject(ViewBag.dataSource)), 'ShipCountry', true);; + new DropDownList({value: args.rowData.ShipCountry, popupHeight: '200px', floatLabelType: 'Always', + dataSource: countryData, fields: {text: 'ShipCountry', value: 'ShipCountry'}, placeholder: 'Ship Country'}, args.form.elements.namedItem('ShipCountry')); + } + } -In the below code example, we have format and updated the **freight** value. +``` -``` typescript +### Get value from editor + +The get value from editor feature in the Syncfusion Grid allows you to read, format, and update the current editor value before it is saved. This feature is particularly valuable when you need to perform specific actions on the data, such as formatting or validation, before it is committed to the underlying data source. + +To achieve this feature, you can utilize the [ActionBegin](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event with the **requestType** set to **save**. + +In the following code example, the freight value has been formatted and updated. + +```ts function actionBegin(args) { if (args.requestType === 'save') { // cast string to integer value. @@ -92,11 +110,13 @@ In the below code example, we have format and updated the **freight** value. ``` -## Set focus to editor +### Set focus to particular column editor -By default, the first input element in the dialog will be focused while opening the dialog. If the first input element is in disabled or hidden state, focus the valid input element in the [`ActionComplete`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event based on **requestType** as **beginEdit**. +The Syncfusion Grid allows you to control the focus behavior of input elements in edit forms. By default, the first input element in the dialog receives focus when the dialog is opened. However, in scenarios where the first input element is disabled or hidden, you can specify which valid input element should receive focus. This can be achieved using the [ActionComplete](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event of the Grid, where the **requestType** is set to **beginEdit**. -```typescript +In the following code example, the CustomerID column focused. + +```ts function actionComplete(args) { // Set initail Focus @@ -107,13 +127,35 @@ By default, the first input element in the dialog will be focused while opening ``` -## Adding validation rules for custom editors +### Disable default form validation -If you have used additional fields that are not present in the column model, then add the validation rules to the [`ActionComplete`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event. +The Syncfusion Grid provides built-in support for vue form validation to ensure data integrity and accuracy during editing. However, there might be scenarios where you want to disable the default form validation rules. This can be achieved using the `removeRules` method within the [ActionComplete](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event of the Grid. + +To disable default form validation rules in the Grid, follow these steps: ```typescript - function actionComplete(args) => { + function actionComplete: (args) { + if ((args.requestType === 'beginEdit' || args.requestType === 'add')) { + // Disable the Validation Rules + args.form.ej2_instances[0].removeRules(); + } + } + +``` +> * You can use this method to disable validation rules: **args.form.ej2_instances[0].rules = {}**. + +### Adding validation rules for custom editors + +The Syncfusion Grid provides the ability to add validation rules for fields that are not present in the column model. This feature is particularly useful to prevent erroneous or inconsistent data from being submitted, ultimately enhancing the reliability of your application's data. + +To accomplish this, you can utilize the [ActionComplete](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event along with the `addRules` method. + +Here's how you can use the `addRules` method to add validation rules for custom editors in the `actionComplete` event: + +```ts + + function actionComplete(args) { if ((args.requestType === 'beginEdit' || args.requestType === 'add')) { // Add Validation Rules args.form.ej2_instances[0].addRules('Freight', {max: 500}); @@ -122,38 +164,22 @@ If you have used additional fields that are not present in the column model, the ``` -## Render tab component inside the dialog template +## Render tab control inside the dialog template -You can use [`tab`](../../../tab/index.html) component inside dialog edit UI using dialog template feature. The dialog template feature can be enabled by defining [`Mode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property of [`EditSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html) as **Dialog** and [`Template`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) as SCRIPT element ID or HTML string which holds the template. +You can enhance the editing experience in the Grid by rendering a [Tab](https://ej2.syncfusion.com/aspnetmvc/documentation/tab/getting-started) component inside the dialog template. This feature is especially useful when you want to present multiple editing sections or categories in a tabbed layout, ensuring a more intuitive and easily navigable interface for data editing. -The following example demonstrate the usage of tab control inside the dialog template. +To enable this functionality, you need to set the [EditSettings.Mode](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property of the Grid to **Dialog**. This configures the Grid to use the dialog editing mode. Additionally, you can use the [EditSettings.Template](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) property to define a template variable that contains the `Tab` component and its corresponding content. -{% if page.publishingplatform == "aspnet-core" %} +The following example renders a tab component inside the edit dialog. The tab component has two tabs, and once you fill in the first tab and navigate to the second one, the validation for the first tab is performed before navigating to the second. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/tabediting/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/tabediting/dialog.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/tabediting/dialog.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} {% include code-snippet/grid/edit/tabediting/razor %} {% endhighlight %} {% highlight c# tabtitle="Dialog.cs" %} {% include code-snippet/grid/edit/tabediting/dialog.cs %} {% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/tabediting/dialog.cs %} -{% endhighlight %} {% endtabs %} -{% endif %} + +![Render tab control inside the dialog template](../images/editing/template-tab.gif) diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/validation.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/validation.md index 006bb93c70..978aec6d7c 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/validation.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/editing/validation.md @@ -8,64 +8,115 @@ publishingplatform: ##Platform_Name## documentation: ug --- +# Validation in ASP.NET MVC Grid component -# Validation +Validation is a crucial aspect of data integrity in any application. The ASP.NET MVC Grid component in Syncfusion® provides built-in support for easy and effective data validation. This feature ensures that the data entered or modified adheres to predefined rules, preventing errors and guaranteeing the accuracy of the displayed information. ## Column validation -Column validation allows you to validate the edited or added row data and it display errors for invalid fields before saving data. Grid uses **Form Validator** component for column validation. You can set validation rules by defining the [`ValidationRules`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_ValidationRules). +Column validation allows you to validate the edited or added row data before saving it. This feature is particularly useful when you need to enforce specific rules or constraints on individual columns to ensure data integrity. By applying validation rules to columns, you can display error messages for invalid fields and prevent the saving of erroneous data. This feature leverages the **Form Validator** component to perform the validation. You can define validation rules using the `Columns.ValidationRules` property to specify the criteria for validating column values. -{% if page.publishingplatform == "aspnet-core" %} +The following code example demonstrates how to define a validation rule for grid column: {% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/columnvalid/tagHelper %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/validation-columnvalid/razor %} {% endhighlight %} -{% highlight c# tabtitle="Columnvalid.cs" %} -{% include code-snippet/grid/edit/columnvalid/columnvalid.cs %} +{% highlight c# tabtitle="columnvalid.cs" %} +{% include code-snippet/grid/edit/validation-columnvalid/columnvalid.cs %} {% endhighlight %} {% endtabs %} -{% elsif page.publishingplatform == "aspnet-mvc" %} +![Column validation](../images/editing/validation.png) + +## Custom validation + +The Custom validation feature is used to define and enforce your own validation rules for specific columns in the Grid. This is achieved by leveraging the utilizing the **Form Validator custom rules**, you can enforce your desired validation logic and display error messages for invalid fields. + +In the below demo, custom validation applied for **CustomerID** column. {% tabs %} {% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/columnvalid/razor %} +{% include code-snippet/grid/edit/validation-customvalidation/razor %} {% endhighlight %} -{% highlight c# tabtitle="Columnvalid.cs" %} -{% include code-snippet/grid/edit/columnvalid/columnvalid.cs %} +{% highlight c# tabtitle="customvalidation.cs" %} +{% include code-snippet/grid/edit/validation-customvalidation/customvalidation.cs %} {% endhighlight %} {% endtabs %} -{% endif %} +![Custom validation](../images/editing/validation-custom.png) +### Custom validation based on dropdown change -## Custom validation +The Custom validation feature in the Grid allows you to apply validation rules and messages to a column based on the value of another column in edit mode. This feature is particularly useful when you need to enforce specific validation criteria that depend on the selection made in a dropdown column. -You can define your own custom validation rules for the specific columns by using **Form Validator custom rules**. +In the following sample, dropdownlist edit type is used for the **Role** and **Salary** columns. Here, you can apply the custom validation in the **Salary** column based on the value selected in the **Role** column. -In the below demo, custom validation applied for **CustomerID** column. +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/validation-dropdown-change/razor %} +{% endhighlight %} +{% highlight c# tabtitle="columnvalid.cs" %} +{% include code-snippet/grid/edit/validation-dropdown-change/columnvalid.cs %} +{% endhighlight %} +{% endtabs %} + +![Custom validation based on dropdown change](../images/editing/validation-dropdown.gif) + +### Custom validation for numeric column + +Custom validation for a numeric column Grid is useful when you want to enforce specific validation rules on numeric values in a column. This allows you to define your own validation logic and display custom error messages when the you enters invalid data. + +In the following example, custom validation functions, namely **customFunction** and **customFunctionOne**, are defined to check the entered numeric value against your validation criteria. Then, the grid column is configured with the appropriate validation settings using the **freightRules** object, specifying the custom validation functions along with corresponding error messages. Additionally, the [Change](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Inputs.NumericTextBox.html#Syncfusion_EJ2_Inputs_NumericTextBox_Change) event of the numeric column is bound to the `validate` method of the form element through the edit params. This enables you to trigger validation and display error messages whenever the you modifies the value in the [NumericTextBox](https://ej2.syncfusion.com/aspnetmvc/documentation/numerictextbox/getting-started). -{% if page.publishingplatform == "aspnet-core" %} +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/validation-numericcolumn/razor %} +{% endhighlight %} +{% highlight c# tabtitle="columnvalid.cs" %} +{% include code-snippet/grid/edit/validation-numericcolumn/columnvalid.cs %} +{% endhighlight %} +{% endtabs %} + +![Custom validation for numeric column](../images/editing/validation-numeric.png) + +## Dynamically add or remove validation rules from the form + +You can dynamically add or remove validation rules from input elements within a form. This feature is particularly useful when you need to adjust the validation rules based on different scenarios or dynamically changing data. + +To add validation rules dynamically to an input element, you can use the `addRules` method. This method enables you to add validation rules to the corresponding input element based on the name attribute. + +The following example to demonstrates how to dynamically add or remove a required validation rule for an input field based on a **CheckBox** selection: {% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/customvalidation/tagHelper %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/validation-add-remove/razor %} {% endhighlight %} -{% highlight c# tabtitle="Customvalidation.cs" %} -{% include code-snippet/grid/edit/customvalidation/customvalidation.cs %} +{% highlight c# tabtitle="columnvalid.cs" %} +{% include code-snippet/grid/edit/validation-add-remove/columnvalid.cs %} {% endhighlight %} {% endtabs %} -{% elsif page.publishingplatform == "aspnet-mvc" %} +![Dynamically add or remove validation rules from the form](../images/editing/validation-add-remove.png) + +>To remove an existing validation rule from an input element, you can use the `removeRules` method. + +## Change the position of validation error message + +By default, the validation error message in Grid is displayed below the input field. However, you have an option to customize its position and display it in a different location. This feature is particularly useful when you want to align the error message according to your application's design and layout. + +To change the position of the validation error message in Grid, you can utilize the `CustomPlacement` event. This event allows you to define a custom logic to position the error message at the desired location. + +Here's an example that demonstrates how to change the position of the validation error message to the top of the input field: {% tabs %} {% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/customvalidation/razor %} +{% include code-snippet/grid/edit/validation-position/razor %} {% endhighlight %} -{% highlight c# tabtitle="Customvalidation.cs" %} -{% include code-snippet/grid/edit/customvalidation/customvalidation.cs %} +{% highlight c# tabtitle="validation.cs" %} +{% include code-snippet/grid/edit/validation-position/validation.cs %} {% endhighlight %} {% endtabs %} -{% endif %} + +![Change the position of validation error message](../images/editing/validation-position.png) diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/add-params-for-filtering.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/add-params-for-filtering.md deleted file mode 100644 index 596546ee29..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/add-params-for-filtering.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: post -title: Add Params For Filtering in ##Platform_Name## Grid Component -description: Learn here all about Add Params For Filtering in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Add Params For Filtering -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Customizing Filter Dialog by using an additional Parameter - -You can customize the default settings of the components which are used in Menu filter by using params of filter property in column definition. In the below sample, OrderID and Freight Columns are numeric columns, while open the filter dialog then you can see that NumericTextBox with spin button is displayed to change/set the filter value. Now using the params option we hide the spin button in NumericTextBox for OrderID Column. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/add-params-for-filtering/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Excelfilter.cs" %} -{% include code-snippet/grid/how-to/add-params-for-filtering/excelfilter.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/add-params-for-filtering/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Excelfilter.cs" %} -{% include code-snippet/grid/how-to/add-params-for-filtering/excelfilter.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/avoid-typescript-compilation.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/avoid-typescript-compilation.md index 9936ccfb35..24ddfe70f3 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/avoid-typescript-compilation.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/avoid-typescript-compilation.md @@ -1,6 +1,6 @@ --- layout: post -title: Avoid Typescript Compilation in ##Platform_Name## Grid Component +title: Avoid TypeScript Compilation in the Syncfusion Grid Component for ##Platform_Name## description: Learn here all about Avoid Typescript Compilation in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Avoid Typescript Compilation @@ -8,7 +8,6 @@ publishingplatform: ##Platform_Name## documentation: ug --- - # Avoid TypeScript Compilation **Syncfusion.EJ2.Javascript** includes typescript declaration files. If your application is not configured to compile typescript then exception may occur. To resolve this we need to prevent the typescript compilation during MS build process by adding the below line in **.csproj** file. diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/collapse-grouped-rows-at-initial-render.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/collapse-grouped-rows-at-initial-render.md deleted file mode 100644 index d0511abcd0..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/collapse-grouped-rows-at-initial-render.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: post -title: Collapse Grouped Rows At Initial Render in ##Platform_Name## Grid Component -description: Learn here all about Collapse Grouped Rows At Initial Render in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Collapse Grouped Rows At Initial Render -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Collapse all grouped rows at initial render - -You can collapse all the grouped rows at initial rendering by using [`DataBound`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataBound) event with **collapseAll** method of the grid. - -In the below demo, all the grouped rows are collapsed at initial rendering. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/collapse-grouped-rows/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Collapseall.cs" %} -{% include code-snippet/grid/how-to/collapse-grouped-rows/collapseall.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/collapse-grouped-rows/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Collapseall.cs" %} -{% include code-snippet/grid/how-to/collapse-grouped-rows/collapseall.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/complex-column-as-foreign-key-column.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/complex-column-as-foreign-key-column.md deleted file mode 100644 index c10e37b678..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/complex-column-as-foreign-key-column.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: post -title: Complex Column As Foreign Key Column in ##Platform_Name## Grid Component -description: Learn here all about Complex Column As Foreign Key Column in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Complex Column As Foreign Key Column -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Set complex column as Foreignkey column - -The following example shows how to set the complex column as foreign key column. - -In the following example, **Employee.EmployeeID** is a complex column and also declared as a foreign column which shows **FirstName** column from foreign data. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/foreignkey/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Foreignkey.cs" %} -{% include code-snippet/grid/columns/foreignkey/foreignkey.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/foreignkey/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Foreignkey.cs" %} -{% include code-snippet/grid/columns/foreignkey/foreignkey.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/customize-pager-drop-down.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/customize-pager-drop-down.md deleted file mode 100644 index d90c040d93..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/customize-pager-drop-down.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: post -title: Customize Pager Drop Down in ##Platform_Name## Grid Component -description: Learn here all about Customize Pager Drop Down in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Customize Pager Drop Down -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Customize Pager DropDown - -To customize default values of pager dropdown, you need to define in [`PageSizes`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridPageSettings.html#Syncfusion_EJ2_Grids_GridPageSettings_PageSizes) property as array of strings. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/pagerdropdown/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Pagerdropdown.cs" %} -{% include code-snippet/grid/how-to/pagerdropdown/pagerdropdown.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/pagerdropdown/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Pagerdropdown.cs" %} -{% include code-snippet/grid/how-to/pagerdropdown/pagerdropdown.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/display-null-values-at-bottom.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/display-null-values-at-bottom.md deleted file mode 100644 index 671a01bbd4..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/display-null-values-at-bottom.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: post -title: Display Null Values At Bottom in ##Platform_Name## Grid Component -description: Learn here all about Display Null Values At Bottom in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Display Null Values At Bottom -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Display the null date values at bottom of the Grid while perform sorting - -By default the null values are displayed at bottom of the Grid row while perform sorting in ascending order. As well as this values are displayed at top of the Grid row while perform sorting with descending order. But you can customize this default order to display the null values at always bottom row of the Grid by using [`SortComparer`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_SortComparer) property of [`Column`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html). - -In the below code we have displayed the null date values at bottom of the Grid row while sorting the **OrderDate** column in both ways. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/sort-comparer/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Sort-comparer.cs" %} -{% include code-snippet/grid/how-to/sort-comparer/sort-comparer.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/sort-comparer/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Sort-comparer.cs" %} -{% include code-snippet/grid/how-to/sort-comparer/sort-comparer.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/enable-disable-grid-and-its-actions.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/enable-disable-grid-and-its-actions.md index 15225b8087..e8481ef087 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/enable-disable-grid-and-its-actions.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/enable-disable-grid-and-its-actions.md @@ -8,12 +8,9 @@ publishingplatform: ##Platform_Name## documentation: ug --- +# Enable disable grid and its actions in ASP.Net MVC Grid component -# Enable/Disable Grid and its actions - -You can enable/disable the Grid and its actions by applying/removing corresponding CSS styles. - -To enable/disable the grid and its actions, follow the given steps: +You can enable or disable the Syncfusion® ASP.Net MVC Grid and its actions by applying or removing specific CSS styles. This functionality is particularly useful in scenarios where interactions need to be restricted. Follow the steps below to implement this feature. **Step 1**: Create CSS class with custom style to override the default style of Grid. @@ -28,19 +25,19 @@ To enable/disable the grid and its actions, follow the given steps: ``` -**Step 2**: Add/Remove the custom CSS class to the Grid in the click event handler of Button. +**Step 2**: Add/Remove the CSS class to the Grid in the click event handler of Button. ```typescript @@ -49,27 +46,13 @@ To enable/disable the grid and its actions, follow the given steps: In the below demo, the button click will enable/disable the Grid and its actions. -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/disablegrid/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Disablegrid.cs" %} -{% include code-snippet/grid/how-to/disablegrid/disablegrid.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/grid/how-to/disablegrid/razor %} {% endhighlight %} -{% highlight c# tabtitle="Disablegrid.cs" %} +{% highlight c# tabtitle="disablegrid.cs" %} {% include code-snippet/grid/how-to/disablegrid/disablegrid.cs %} {% endhighlight %} {% endtabs %} -{% endif %} - +![Enable disable grid and its actions](../images/howto-enable-disable.gif) diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/enable-editing-in-single-click.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/enable-editing-in-single-click.md deleted file mode 100644 index 10c93b7edc..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/enable-editing-in-single-click.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -layout: post -title: Enable Editing In Single Click in Syncfusion ##Platform_Name## Grid Component -description: Learn here all about Enable Editing In Single Click in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Enable Editing In Single Click -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Enable editing in single click - -## Normal Editing - -You can make a row editable on a single click with **Normal** mode of editing in Grid, by using the **startEdit** and **endEdit** methods. - -Bind the **mouseup** event for Grid and in the event handler call the **startEdit** and **endEdit**, based on the clicked target element. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/single-click-inline-edit/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Single-click-normal-edit.cs" %} -{% include code-snippet/grid/how-to/single-click-inline-edit/single-click-normal-edit.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/single-click-inline-edit/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Single-click-normal-edit.cs" %} -{% include code-snippet/grid/how-to/single-click-inline-edit/single-click-normal-edit.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - - -### Open dropdown edit popup on single click - -You can open the default dropdown edit popup with single click edit by focusing the dropdown element and calling the EJ2 dropdown list's **showPopup** method in the Grid's **ActionComplete** event. In this demo we have used a global flag variable in the **mouseup** event to ensure if the dropdown column is the clicked edit target. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/open-dropdown-popup/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Open-dropdown-popup.cs" %} -{% include code-snippet/grid/how-to/open-dropdown-popup/open-dropdown-popup.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/open-dropdown-popup/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Open-dropdown-popup.cs" %} -{% include code-snippet/grid/how-to/open-dropdown-popup/open-dropdown-popup.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/get-row-cell-index.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/get-row-cell-index.md deleted file mode 100644 index b71e2ac210..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/get-row-cell-index.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: post -title: Get Row Cell Index in ##Platform_Name## Grid Component -description: Learn here all about Get Row Cell Index in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Get Row Cell Index -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Get specific row and cell index in Grid - -You can get the specific row and cell index of the grid by using [`RowSelected`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_RowSelected) event of the grid. Here, we can get the row and cell index by using **aria-rowindex**(get row Index from **tr** element) and **aria-colindex**(column index from **td** element) attribute. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/row-cell-index/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Rowcellidx.cs" %} -{% include code-snippet/grid/how-to/row-cell-index/rowcellidx.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/row-cell-index/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Rowcellidx.cs" %} -{% include code-snippet/grid/how-to/row-cell-index/rowcellidx.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/grid-print.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/grid-print.md deleted file mode 100644 index 844d674019..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/grid-print.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: post -title: Grid Print in ##Platform_Name## Grid Component -description: Learn here all about Grid Print in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Grid Print -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Add a title to the header when using Grid print action - -You can add your title in the header through an [`BeforePrint`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Grids.Grid~BeforePrint.html) event. With the help of this event you can add your title element as you want. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/titleprint/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Titleprint.cs" %} -{% include code-snippet/grid/how-to/titleprint/titleprint.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/titleprint/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Titleprint.cs" %} -{% include code-snippet/grid/how-to/titleprint/titleprint.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/grouped-row-page-size.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/grouped-row-page-size.md deleted file mode 100644 index fde249dee1..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/grouped-row-page-size.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: post -title: Grouped Row Page Size in ##Platform_Name## Grid Component -description: Learn here all about Grouped Row Page Size in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Grouped Row Page Size -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# How to show grouped rows based on the pageSize - -By default, we have displayed the no of records based on the [`PageSize`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridPageSettings.html#Syncfusion_EJ2_Grids_GridPageSettings_PageSize). If you want to show grouped column rows based on the [`PageSize`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridPageSettings.html#Syncfusion_EJ2_Grids_GridPageSettings_PageSize) then we suggest you to use the below way. - -In the below sample, we have overridden the default **generateQuery** to display the grouped rows instead of grid rows based on the [`PageSize`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridPageSettings.html#Syncfusion_EJ2_Grids_GridPageSettings_PageSize). - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/group-page-size/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Group-page-size.cs" %} -{% include code-snippet/grid/how-to/group-page-size/group-page-size.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/group-page-size/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Group-page-size.cs" %} -{% include code-snippet/grid/how-to/group-page-size/group-page-size.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/hide-sorting-in-excel-filter.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/hide-sorting-in-excel-filter.md deleted file mode 100644 index 6bb8e18305..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/hide-sorting-in-excel-filter.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -layout: post -title: Hide Sorting In Excel Filter in ##Platform_Name## Grid Component -description: Learn here all about Hide Sorting In Excel Filter in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Hide Sorting In Excel Filter -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Hide sorting options on excel filter Dialog - -You can hide the sorting options on the excel filter dialog by setting display as none for the following classes. - -```css - .e-excel-ascending, - .e-excel-descending, - .e-separator.e-excel-separator { - display: none; - } -``` - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/disable-sorting-excel/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Disable-sorting-excel.cs" %} -{% include code-snippet/grid/how-to/disable-sorting-excel/disable-sorting-excel.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/disable-sorting-excel/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Disable-sorting-excel.cs" %} -{% include code-snippet/grid/how-to/disable-sorting-excel/disable-sorting-excel.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/hide-the-expand-collapse-icon-in-parent-row.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/hide-the-expand-collapse-icon-in-parent-row.md deleted file mode 100644 index 5a864197dd..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/hide-the-expand-collapse-icon-in-parent-row.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -layout: post -title: Hide The Expand Collapse Icon In Parent Row in ##Platform_Name## Grid Component -description: Learn here all about Hide The Expand Collapse Icon In Parent Row in Syncfusion ##Platform_Name## Grid component of syncfusion and more. -platform: ej2-asp-core-mvc -control: Hide The Expand Collapse Icon In Parent Row -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Hide the expand/collapse icon in parent row with no record in child grid - -By default, the expand/collapse icon will be visible even if the child grid is empty. - -You can use [`RowDataBound`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_RowDataBound) event to hide the icon when there are no records in child grid. - -To hide the expand/collapse icon in parent row when no records in child grid, follow the given steps: - -**Step 1**: Create CSS class with custom style to override the default style of Grid. - -```css - .e-row[aria-selected="true"] .e-customizedExpandcell { - background-color: #e0e0e0; - } - - .e-grid.e-gridhover tr[role='row']:hover { - background-color: #eee; - } - -``` - -**Step 2**: Add the CSS class to the Grid in the [`RowDataBound`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_RowDataBound) event handler of Grid. - -```typescript - - function rowDataBound(args) { - var filter = args.data.EmployeeID; - var data = new ej.data.DataManager(this.childGrid.dataSource).executeLocal(new ej.data.Query().where("EmployeeID", "equal", parseInt(filter), true)); - if (data.length == 0) { - //here hide which parent row has no child records - args.row.querySelector('td').innerHTML = " "; - args.row.querySelector('td').className = "e-customizedExpandcell"; - } - } - -``` - -In the below demo, the expand/collapse icon in the row with **EmployeeID** as **1** is hidden as it does not have record in child Grid. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/hidearrow/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Hidearrow.cs" %} -{% include code-snippet/grid/how-to/hidearrow/hidearrow.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/hidearrow/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Hidearrow.cs" %} -{% include code-snippet/grid/how-to/hidearrow/hidearrow.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/perform-crud-operation-using-anti-forgery-token.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/perform-crud-operation-using-anti-forgery-token.md index b025e4e9d2..3461d45f97 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/perform-crud-operation-using-anti-forgery-token.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/perform-crud-operation-using-anti-forgery-token.md @@ -71,19 +71,6 @@ Now assign the custom adaptor to the grid as follows. ``` -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/anti-forgery-token/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Anti-forgery-token.cs" %} -{% include code-snippet/grid/how-to/anti-forgery-token/anti-forgery-token.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/grid/how-to/anti-forgery-token/razor %} @@ -92,8 +79,5 @@ Now assign the custom adaptor to the grid as follows. {% include code-snippet/grid/how-to/anti-forgery-token/anti-forgery-token.cs %} {% endhighlight %} {% endtabs %} -{% endif %} - - N> You can find the full sample at our [GitHub repository](https://github.com/SyncfusionSamples/ej2-mvc-grid-antiforgerytoken). diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/print-the-expanded-state-from-other-pages.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/print-the-expanded-state-from-other-pages.md deleted file mode 100644 index cf6fbbb090..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/print-the-expanded-state-from-other-pages.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: post -title: Print The Expanded State From Other Pages in ##Platform_Name## Grid Component -description: Learn here all about Print The Expanded State From Other Pages in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Print The Expanded State From Other Pages -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Print the expanded state from other pages - -By default, the expanded child grids will be printed from the current page alone. You can print the expanded child grids from other pages by using the [`Load`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Load) and [`ActionBegin`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event. - -In the following example, we have printed expanded child grids form other pages. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/hierarchyprint/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Hierarchyprint.cs" %} -{% include code-snippet/grid/how-to/hierarchyprint/hierarchyprint.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/hierarchyprint/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Hierarchyprint.cs" %} -{% include code-snippet/grid/how-to/hierarchyprint/hierarchyprint.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/render-both-ej1-and-ej2-grids-in-same-application.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/render-both-ej1-and-ej2-grids-in-same-application.md index 4217324d79..5b366d7fb0 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/render-both-ej1-and-ej2-grids-in-same-application.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/render-both-ej1-and-ej2-grids-in-same-application.md @@ -8,7 +8,6 @@ publishingplatform: ##Platform_Name## documentation: ug --- - # Render both EJ1 and EJ2 Grids in same application To achieve this requirement, you need to use the below code in **_Layout.cshtml** page. Because EJ1 and EJ2 has same library names to perform the different actions. So conflicts may occur when we refer this both controls in same application. To overcome this we need to extend this libraries in ej namespace. diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/select-grid-rows-based-on-certain-condition.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/select-grid-rows-based-on-certain-condition.md deleted file mode 100644 index c5393e442a..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/how-to/select-grid-rows-based-on-certain-condition.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: post -title: Select Grid Rows Based On Certain Condition in ##Platform_Name## Grid Component -description: Learn here all about Select Grid Rows Based On Certain Condition in Syncfusion ##Platform_Name## Grid component of syncfusion and more. -platform: ej2-asp-core-mvc -control: Select Grid Rows Based On Certain Condition -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Select grid rows based on certain condition - -You can select the specific row in the grid based on a certain condition by using the **selectRows** method in the [`DataBound`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataBound) event of Grid. - -In the below demo, we have selected the grid rows only when **EmployeeID** column value greater than **3**. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/databasedselection/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Databasedselection.cs" %} -{% include code-snippet/grid/how-to/databasedselection/databasedselection.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/databasedselection/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Databasedselection.cs" %} -{% include code-snippet/grid/how-to/databasedselection/databasedselection.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/paging.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/paging.md index 1f34ea5f6e..53c4eb4f83 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/paging.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/paging.md @@ -1,6 +1,6 @@ --- layout: post -title: Paging in ##Platform_Name## Grid Component +title: Paging in ##Platform_Name## Grid Component | Syncfusion description: Learn here all about Paging in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Paging diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/print.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/print.md index 0f9fd50811..a3235eb010 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/print.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/print.md @@ -150,11 +150,43 @@ Here's a code example that demonstrates how to show a hidden column (CustomerID) ![Show or hide columns while printing](images/print/print-hide.png) +## Add a title to the header while printing + +You can add a title to the header when printing the Syncfusion® Grid by utilizing the [BeforePrint](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_BeforePrint) event. This event allows you to customize the print layout, including the addition of a title element, ensuring that the printed document is informative and visually appealing. + +Here’s an example of how to add a title to your Grid when using the print function: + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/grid/print/print-add-title/razor %} +{% endhighlight %} +{% highlight c# tabtitle="print.cs" %} +{% include code-snippet/grid/print/print-add-title/print.cs %} +{% endhighlight %} +{% endtabs %} + +## Print the expanded state from other pages + +By default, when printing, the Syncfusion® Grid component only includes the expanded child grids visible on the current page. However, you can enhance the printing functionality to include expanded child grids from other pages. This can be achieved using the [Load](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Load) and [ActionBegin](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) events, which help manage the expanded state of rows across different pages. + +The following example demonstrates how to print the expanded child grids from other pages: + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/print/print-expanded-state/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Hierarchyprint.cs" %} +{% include code-snippet/grid/print/print-expanded-state/hierarchyprint.cs %} +{% endhighlight %} +{% endtabs %} + +![Print the expanded state from other pages](../images/print/print-another-page.png) + ## Limitations of printing large data Printing a large volume of data all at once in the grid can have certain limitations due to potential browser performance issues. Rendering numerous DOM elements on a single page can lead to browser slowdowns or even hang the browser. The grid offers a solution to manage extensive datasets through virtualization. However, it's important to note that virtualization for both rows and columns is not feasible during the printing process. -If printing all the data remains a requirement, an alternative approach is recommended. Exporting the grid data to formats like [Excel](https://ej2.syncfusion.com/aspnetcore/documentation/grid/excel-export/excel-exporting) or [CSV](https://ej2.syncfusion.com/aspnetcore/documentation/grid/excel-export/excel-exporting) or [Pdf](https://ej2.syncfusion.com/aspnetcore/documentation/grid/pdf-export/pdf-export) is advised. This exported data can then be printed using non-web-based applications, mitigating the potential performance challenges associated with printing large datasets directly from the browser. +If printing all the data remains a requirement, an alternative approach is recommended. Exporting the grid data to formats like [Excel](https://ej2.syncfusion.com/aspnetmvc/documentation/grid/excel-export/excel-exporting) or [CSV](https://ej2.syncfusion.com/aspnetmvc/documentation/grid/excel-export/excel-exporting) or [Pdf](https://ej2.syncfusion.com/aspnetmvc/documentation/grid/pdf-export/pdf-export) is advised. This exported data can then be printed using non-web-based applications, mitigating the potential performance challenges associated with printing large datasets directly from the browser. ## Retain grid styles while printing diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/sorting.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/sorting.md index 725505ac85..3c4519dd2e 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/sorting.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/sorting.md @@ -116,10 +116,10 @@ The example below demonstrates how to display null values at the bottom of the g {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/sort-comparer/razor %} +{% include code-snippet/grid/sorting/sort-comparer/razor %} {% endhighlight %} {% highlight c# tabtitle="sort-comparer.cs" %} -{% include code-snippet/grid/how-to/sort-comparer/sort-comparer.cs %} +{% include code-snippet/grid/sorting/sort-comparer/sort-comparer.cs %} {% endhighlight %} {% endtabs %} diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/aggregates/aggregates.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/aggregates/aggregates.md index bd8886eab0..e27b7f063e 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/aggregates/aggregates.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/aggregates/aggregates.md @@ -62,4 +62,25 @@ Here is an example that demonstrates how to use built-in aggregates types in the {% endhighlight %} {% endtabs %} -![Built-in aggregate types](../images/aggregates/aggregate-types.png) \ No newline at end of file +![Built-in aggregate types](../images/aggregates/aggregate-types.png) + +## Multiple aggregates for a column + +Multiple aggregates for a column allows you to calculate and display different summary values simultaneously for a single column in a grid. Normally, a column is associated with a single aggregate function, such as sum, average, count and etc., which provides a single summary value for the entire column. + +However, in scenarios where you need to display multiple summary values for the same column, multiple aggregates come into play. This feature enables you to calculate and display various aggregate values, such as sum, average, minimum, maximum, or custom calculations, concurrently for a specific column. + +You can use multiple aggregates for a single column in the Syncfusion® ASP.Net Core Grid by specifying the aggregate `type` as an array. + +Here's an example of how to use multiple aggregates in the Syncfusion® ASP.Net Core Grid: + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/aggregate/aggregates-multiple/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="aggregate.cs" %} +{% include code-snippet/grid/aggregate/aggregates-multiple/aggregate.cs %} +{% endhighlight %} +{% endtabs %} + +![Multiple aggregates for a column](../images/aggregates/aggregates-multiple.png) \ No newline at end of file diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/column-rendering.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/column-rendering.md index 467dbe718b..0378d40083 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/column-rendering.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/column-rendering.md @@ -216,3 +216,37 @@ In the below example, we have used the `expand` query to load the nested Employe {% endtabs %} ![Using remote data](../images/column-rendering/column-render-remote.png) + +### Complex data binding with list of array of objects + +The Syncfusion® Grid supports complex data binding with lists of arrays of objects. This feature allows you to bind complex data with multiple levels of nested objects and arrays to the Grid. + +The following example shows how to set complex field for datasource having array of objects. + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/columns/column-complexbinding/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Complexbinding.cs" %} +{% include code-snippet/grid/columns/column-complexbinding/complexbinding.cs %} +{% endhighlight %} +{% endtabs %} + +![Complex data binding with list of array of objects](../images/column-rendering/column-complex.png) + +### How to set complex column as foreign key column + +The Syncfusion® Grid control provides the ability to set complex columns as foreign key columns. This allows you to display related data from a foreign data source based on the complex column value. + +The following example demonstrates how to set the **Employee.EmployeeID** column as a foreign key column, and display the **FirstName** column from the foreign data. + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/columns/foreignkey/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Foreignkey.cs" %} +{% include code-snippet/grid/columns/foreignkey/foreignkey.cs %} +{% endhighlight %} +{% endtabs %} + +![Complex data binding with list of array of objects](../images/column-rendering/column-foriegn-complex.png) diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/command-column-editing.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/command-column-editing.md index 2b7ebb01e5..25cb7eafb7 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/command-column-editing.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/command-column-editing.md @@ -8,12 +8,13 @@ publishingplatform: ##Platform_Name## documentation: ug --- +# Command column editing in ASP.NET Core Grid component -# Command Column Editing +The command column editing feature allows you to add CRUD (Create, Read, Update, Delete) action buttons in a column for performing operations on individual rows.This feature is commonly used when you need to enable inline editing, deletion, or saving of row changes directly within the grid. -The command column provides an option to add CRUD action buttons in a column. This can be defined by the [`commands`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Commands) property of [`e-grid-column`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Columns) tag helper. +To enable command column editing, you can utilize the `column.commands` property. By defining this property, you can specify the command buttons to be displayed in the command column, such as Edit, Delete, Save, and Cancel. -The available built-in command buttons are: +The available built-in command buttons are: | Command Button | Actions | |----------------|---------| @@ -22,55 +23,35 @@ The available built-in command buttons are: | Save | Update the edited row.| | Cancel | Cancel the edited state. | -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/commandcolumn/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Commandcolumn.cs" %} -{% include code-snippet/grid/edit/commandcolumn/commandcolumn.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} +Here's an example that demonstrates how to add CRUD action buttons in a column using the `commands` column property : {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/grid/edit/commandcolumn/razor %} {% endhighlight %} -{% highlight c# tabtitle="Commandcolumn.cs" %} +{% highlight c# tabtitle="commandcolumn.cs" %} {% include code-snippet/grid/edit/commandcolumn/commandcolumn.cs %} {% endhighlight %} {% endtabs %} -{% endif %} - +![Command column editing](../images/editing/edit-command.gif) ## Custom command column -The custom command buttons can be added in a column by using the [`commands`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Commands) property of [`e-grid-column`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Columns) tag helper and the action for the custom buttons can be defined using **commandClick** event. +The custom command column feature in the Grid component allows you to add custom command buttons in a column to perform specific actions on individual rows. This feature is particularly useful when you need to provide customized functionality for editing, deleting, or performing any other operation on a row. -{% if page.publishingplatform == "aspnet-core" %} +To add custom command buttons in a column, you can utilize the `column.commands` property. Furthermore, you can define the actions associated with these custom buttons using the [commandClick](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_CommandClick) event. -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/customcommand/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Customcommand.cs" %} -{% include code-snippet/grid/edit/customcommand/customcommand.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} +Here's an example that demonstrates how to add custom command buttons using the `commands` property and customize the button click behavior to display grid details in a dialog using the `commandClick` event: {% tabs %} {% highlight razor tabtitle="CSHTML" %} {% include code-snippet/grid/edit/customcommand/razor %} {% endhighlight %} -{% highlight c# tabtitle="Customcommand.cs" %} +{% highlight c# tabtitle="customcommand.cs" %} {% include code-snippet/grid/edit/customcommand/customcommand.cs %} {% endhighlight %} {% endtabs %} -{% endif %} + +![Custom command column](../images/editing/edit-custom.png) diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/dialog-editing.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/dialog-editing.md index 3bfd4f31b2..4eb10046ad 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/dialog-editing.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/dialog-editing.md @@ -8,179 +8,99 @@ publishingplatform: ##Platform_Name## documentation: ug --- +# Dialog editing in ASP.NET Core Grid component -# Dialog Editing in ASP.NET Core Grid Component +Dialog editing is a feature in the Grid component that allows you to edit the data of the currently selected row using a dialog window. With dialog editing, you can easily modify cell values and save the changes back to the data source.This feature is particularly beneficial in scenarios where you need to quickly modify data without navigating to a separate page or view, and it streamlines the process of editing multiple cells. -In dialog edit mode, when you start editing the currently selected row data will be shown on a dialog. You can change the cell values and save edited data to the data source. To enable Dialog edit, set the [`mode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property of [`e-grid-editSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_EditSettings) tag helper as **Dialog**. +To enable dialog editing in grid component, you need to set the [editSettings.mode](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property to **Dialog**. This property determines the editing mode for the grid, and when set to **Dialog**, it enables the dialog editing feature. -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/dialog/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/dialog/dialog.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} +Here's an example how to enable dialog editing in the ASP.NET Core grid component: {% tabs %} {% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/dialog/razor %} +{% include code-snippet/grid/edit/dialog/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Dialog.cs" %} {% include code-snippet/grid/edit/dialog/dialog.cs %} {% endhighlight %} {% endtabs %} -{% endif %} - +![Dialog editing](../images/editing/dialog-edit.png) ## Customize edit dialog -You can customize the appearance of the edit dialog in the [`actionComplete`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event based on **requestType** as **beginEdit** or **add**. - -In the following example, the dialog's properties like header text, showCloseIcon, height have been changed while editing and adding the records. - -Also the locale text for the **Save** and **Cancel** buttons has been changed by overriding the default locale strings. - -You can refer the Grid [`Default text`](../global-local/) list for more localization. +The edit dialog in the Grid component allows you to customize its appearance and behavior based on the type of action being performed, such as editing or adding a record. You can modify properties like header text, showCloseIcon, and height to tailor the edit dialog to your specific requirements. Additionally, you can override default localization strings to provide custom text for buttons or other elements within the dialog. -{% if page.publishingplatform == "aspnet-core" %} +To customize the edit dialog, you need to handle the [actionComplete](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event of the Grid component and perform the necessary modifications based on the **requestType** parameter. The **requestType** parameter identifies the type of action being performed, such as **beginEdit** for editing a record or **add** for adding a new record. -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/customizedialog/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/customizedialog/dialog.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/customizedialog/dialog.cs %} -{% endhighlight %} -{% endtabs %} +>You can refer the Grid [Default text](../global-local/) list for more localization. -{% elsif page.publishingplatform == "aspnet-mvc" %} +The following example that demonstrates how to customize the edit dialog using the `actionComplete` event: {% tabs %} {% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/customizedialog/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/customizedialog/dialog.cs %} +{% include code-snippet/grid/edit/customizedialog/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Dialog.cs" %} {% include code-snippet/grid/edit/customizedialog/dialog.cs %} {% endhighlight %} {% endtabs %} -{% endif %} - +![Customize edit dialog](../images/editing/dialog-customize.png) -> The Grid add or edit dialog element has the max-height property, which is calculated based on the available window height. So, in the normal window (1920 x 1080), it is possible to set the dialog’s height up to 658px. +> The Grid add or edit dialog element has the max-height property, which is calculated based on the available window height. So, in the normal window (1920 x 1080), it is possible to set the dialog's height up to 658px. ## Show or hide columns in dialog editing -The Grid has the option to show hidden columns or hide visible columns while editing in the dialog edit mode by using the [actionBegin](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event of the Grid. - -In the `actionBegin` event, when the `requestType` is `beginEdit` or `add`, the column will be shown or hidden using the [visible](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Visible) property of [e-grid-column](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html) tag helper. When the `requestType` is `save`, the properties will be reset to their original state. - -In the following example, the CustomerID column is rendered as a hidden column, and the ShipCountry column is rendered as a visible column. In the edit mode, the CustomerID column will be changed to a visible state and the ShipCountry column will be changed to a hidden state. - -{% if page.publishingplatform == "aspnet-core" %} +The show or hide columns in dialog editing feature in the grid allows you to dynamically control the visibility of columns while editing in the dialog edit mode. This feature is useful when you want to display specific columns based on the type of action being performed, such as editing an existing record or adding a new record. To achieve this, you can utilize the [actionBegin](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event of the Grid. -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/show-hide-edit-dialog/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs %} -{% endhighlight %} -{% endtabs %} +The `actionBegin` event is triggered whenever an action is initiated in the grid, such as editing, adding, or deleting a record. Within the event handler, you can check the **requestType** parameter to determine the type of action being performed. If the **requestType** is `beginEdit` or `add`, you can modify the visibility of columns using the `column.visible` property. This property is used to determine whether a column should be displayed or hidden. Then, when the **requestType** is `save`, you can reset the column visibility to its initial state using the `column.visible` property. -{% elsif page.publishingplatform == "aspnet-mvc" %} +In the following example, the **CustomerID** column is rendered as a hidden column, and the **ShipCountry** column is rendered as a visible column. In the edit mode, the **CustomerID** column will be changed to a visible state and the **ShipCountry** column will be changed to a hidden state. {% tabs %} {% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/show-hide-edit-dialog/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs %} +{% include code-snippet/grid/edit/show-hide-edit-dialog/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Dialog.cs" %} {% include code-snippet/grid/edit/show-hide-edit-dialog/dialog.cs %} {% endhighlight %} {% endtabs %} -{% endif %} - +![Show or hide columns in dialog editing](../images/editing/dialog-show-hide.png) ## Use wizard like dialog editing -Wizard helps you create intuitive step-by-step forms to fill. You can achieve the wizard like editing by using the dialog template feature. It support your own editing template by defining [`mode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) as **Dialog** and [`template`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) as SCRIPT element ID or HTML string which holds the template. - -The following example demonstrate the wizard like editing in the grid with the obtrusive Validation. +Wizard-like dialog editing is a powerful feature in the Grid component that enables the creation of intuitive step-by-step forms. This feature provides a structured approach to form completion or data entry by breaking down the process into manageable steps.This feature is particularly useful when you have complex forms that need to be broken down into smaller sections to guide you through the data entry process. -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/wizardediting/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/wizardediting/dialog.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/wizardediting/dialog.cs %} -{% endhighlight %} -{% endtabs %} +To achieve wizard-like dialog editing in the grid component, you can use the dialog template feature. This feature allows you to define your own custom editing template using the [editSettings.mode](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property set to **Dialog** and the [editSettings.template](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) property to specify the template variable that defines the editors for each step of the wizard. -{% elsif page.publishingplatform == "aspnet-mvc" %} +The following example demonstrate the wizard like editing in the grid with the unobtrusive validation. {% tabs %} {% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/wizardediting/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/wizardediting/dialog.cs %} +{% include code-snippet/grid/edit/wizardediting/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Dialog.cs" %} {% include code-snippet/grid/edit/wizardediting/dialog.cs %} {% endhighlight %} {% endtabs %} -{% endif %} +![Use wizard like dialog editing](../images/editing/dialog-tabs-multiple.gif) -## Customize Add/Edit Dialog footer +## Customize add/edit dialog footer -In dialog edit mode, a dialog will show up when editing the currently selected row or adding a new row. By default, you can save or cancel the edited changes by clicking the Save or Cancel button in the dialog's footer. Along with these buttons, it is possible to add a custom button in the footer section using the [ActionComplete](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridBuilder-1.html#Syncfusion_EJ2_Grids_GridBuilder_1_ActionComplete_System_String_) event of the Grid. +The Customize add/edit dialog footer feature in the grid allows you to modify the footer section of the dialog that appears when editing the currently selected row or adding a new row. By default, the dialog displays two buttons in the footer section: Save and Cancel, which allow you to save or discard the changes made in the dialog. This feature is particularly helpful when you want to add custom buttons to the dialog's footer, implement specific actions, or customize the appearance of the buttons, such as changing their color or size in the dialog's footer. This can be achieved using the [actionComplete](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event of the Grid component. -In the following sample, using the `dialog` argument of the `ActionComplete` event, the action for the custom button can be customized. - -{% if page.publishingplatform == "aspnet-core" %} +In the following sample, using the `dialog` argument of the `actionComplete` event, the action for the custom button can be customized. {% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} +{% highlight razor tabtitle="CSHTML" %} {% include code-snippet/grid/edit/custombutton/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="Dialog-Footer.cs" %} +{% highlight c# tabtitle="custombutton.cs" %} {% include code-snippet/grid/edit/custombutton/custombutton.cs %} {% endhighlight %} {% endtabs %} -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/custombutton/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog-Footer.cs" %} -{% include code-snippet/grid/edit/custombutton/custombutton.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} \ No newline at end of file +![Customize add/edit dialog footer](../images/editing/dialog-footer.png) \ No newline at end of file diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/edit-types.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/edit-types.md index 7364feeed0..dd125c3be5 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/edit-types.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/edit-types.md @@ -122,6 +122,27 @@ The following sample code demonstrates the customization applied to DropDownList ![Customize dropdown edit type](../images/editing/dropdown-edit-type.png) +### Provide custom data source for DropDownList component + +In Syncfusion® Grid component, you have an option to provide a custom data source for the [DropDownList](https://ej2.syncfusion.com/aspnetcore/documentation/drop-down-list/getting-started) component in the edit form. This feature allows you to define a specific set of values for the DropDownList. + +To achieve this, you can utilize the `columns->edit->params` property. This property allows you to define the edit params for the column within the grid. + +When setting a new data source using the edit params, you need to specify a new [query](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_Query) property for the DropDownList. The `query` property allows you to define custom queries for data retrieval and filtering. + +In the below demo, DropDownList is rendered with custom data source for the **ShipCountry** column : + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/custom-data-params/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Dropdownlist-params.cs" %} +{% include code-snippet/grid/edit/custom-data-params/dropdown-params.cs %} +{% endhighlight %} +{% endtabs %} + +![Provide custom data source for DropDownList component](../images/editing/dropdown-edit-type.png) + ### Apply filtering for DropDownList component The Syncfusion® Grid component provides filtering for the DropDownList within the edit form. This feature allows to select options from a predefined list and easily search for specific items using the built-in filtering feature. @@ -456,6 +477,25 @@ The following example demonstrates how to render a RichTextEditor component in t ![Render richtext editor component](../images/editing/render-richtext-editor.gif) +### Render Upload component in edit form + +The Syncfusion Grid allows you to render an Upload control within the Grid's edit form. This feature is especially valuable when you need to upload and manage files or images in a specific column during data editing. + +To render Upload control in edit form, you need to define a cell edit template for the column using `edit` property. The **edit** property specifies the cell edit template that used as an editor for a particular column. + +The following example demonstrates how to render a Upload control in the **Employee Image** column of the Syncfusion Grid. The [actionBegin](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event is handled to update the edited value in the grid when the save button is clicked: + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/edit-upload/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="upload.cs" %} +{% include code-snippet/grid/edit/edit-upload/upload.cs %} +{% endhighlight %} +{% endtabs %} + +![Render Upload component in edit form](../images/editing/edit-types-upload.gif) + ### Render AutoComplete component in edit form The Syncfusion® Grid allows you to render the AutoComplete component within the edit form by using the cell edit template feature.This feature enables you to select values from a predefined list during the editing of a specific column. It is especially valuable when you need to provide a dropdown-like auto-suggestion and input assistance for data entry in the Grid's columns. diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/template-editing.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/template-editing.md index 75e9f8fbba..109610f719 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/template-editing.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/template-editing.md @@ -8,81 +8,99 @@ publishingplatform: ##Platform_Name## documentation: ug --- +# Template editing in ASP.NET Core Grid component -# Template Editing +The Syncfusion ASP.NET Core Grid component supports template editing, providing a powerful and flexible way to customize the appearance and behavior of cells during editing. This feature allows you to use ASP.NET Core templates to define the structure and content of the cells within the grid. -## Inline or dialog template editing +## Inline or dialog template editing -The dialog template editing provides an option to customize the default behavior of dialog editing. Using the dialog template, you can render your own editors by defining the [`mode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property of [`e-grid-editSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_EditSettings) tag helper as **Dialog/Inline** and [`template`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) property as SCRIPT element ID or HTML string which holds the template. +The Syncfusion Grid provides support for inline and dialog template editing, allowing you to customize the editing using `Forms`. These forms can be utilized to add and update grid records. -In some cases, you need to add the new field editors in the dialog which are not present in the column model. In that situation, the template will help you to customize the default edit dialog. +To enable this feature, you need to set the [editSettings.mode](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property of the Grid to either **Normal** or **Dialog** and define the grid editors using [editSetting.template](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template). -In the below code example, demonstrate the usage of binding a partial view in the dialog template. +**Using Forms** -{% if page.publishingplatform == "aspnet-core" %} +Forms is a approach to create and manipulate the form controls. You can use form to add and update grid records. To use forms for editing operation, you can take leverage of the template support of dialog or inline edit mode. Setting the [editSettings.mode](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) as **Normal/Dialog** and use [editSetting.template](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) property to specify a SCRIPT element ID or an HTML string that holds the template. + +In some cases, you want to add new field editors in the dialog which are not present in the column model. In that situation the dialog template will help us to customize the default edit dialog. + +In the following sample, grid enabled with dialog template editing. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/grid/edit/dialogtemplate/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="Addpatial.cs" %} +{% highlight c# tabtitle="AddPartial.cshtml" %} {% include code-snippet/grid/edit/dialogtemplate/addpatial.cs %} {% endhighlight %} -{% highlight c# tabtitle="AddpatialMVC.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/addpatialMVC.cs %} +{% highlight c# tabtitle="EditPartial.cshtml" %} +{% include code-snippet/grid/edit/dialogtemplate/editpartial.cs %} {% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/dialog.cs %} +{% highlight c# tabtitle="dialogData.cs" %} +{% include code-snippet/grid/edit/dialogtemplate/dialogData.cs %} {% endhighlight %} -{% highlight c# tabtitle="Dialogtemplatemodel.cs" %} +{% highlight c# tabtitle="DialogTemplateModel.cs" %} {% include code-snippet/grid/edit/dialogtemplate/dialogtemplatemodel.cs %} {% endhighlight %} -{% highlight c# tabtitle="Editpartial.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/editpartial.cs %} -{% endhighlight %} -{% highlight c# tabtitle="EditpartialMVC.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/editpartialMVC.cs %} -{% endhighlight %} {% endtabs %} -{% elsif page.publishingplatform == "aspnet-mvc" %} +| Add | Edit | +| -------------- | ------------- | +| ![Add](../images/editing/template-inline-add.png) | ![Edit](../images/editing/template-inline-edit.png) | -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/dialogtemplate/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Addpatial.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/addpatial.cs %} -{% endhighlight %} -{% highlight c# tabtitle="AddpatialMVC.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/addpatialMVC.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/dialog.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialogtemplatemodel.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/dialogtemplatemodel.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Editpartial.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/editpartial.cs %} -{% endhighlight %} -{% highlight c# tabtitle="EditpartialMVC.cs" %} -{% include code-snippet/grid/edit/dialogtemplate/editpartialMVC.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} +> The template form editors should have **name** attribute. + +## Using template context + +You can enhance the customization of your grid's edit forms by utilizing template contexts, such as accessing row details inside template, rendering editors as components, getting values from editors, setting focus to editors, and disabling default form validation, and adding custom validation. These features are applicable in both **inline** and **dialog** editing modes. + +The following template context topics are demonstrated through a practical example in the [Render tab component inside the dialog template](https://ej2.syncfusion.com/aspnetcore/documentation/grid/editing/template-editing#render-tab-component-inside-the-dialog-template) topic. + +### Access row details inside template using template context + +When utilizing edit templates in the Grid , you can access crucial row information within an template when utilizing edit templates. This enables dynamic binding of attributes, values, or elements based on the specific row being edited. This is particularly useful for conditionally rendering or modifying elements in the edit template based on the row's state. +The following properties will be available at the time of template execution: +| Property Name | Usage | +|---------------|-------| +| isAdd | A Boolean property that defines whether the current row is a new record or not. | -N> The Dialog/Inline template form editors should have **name** attribute. +The following code example demonstrates the usage of the `isAdd` property in an edit template to disable the **OrderID** textbox when it's not a new record: -## Get value from editor +```ts + +``` + +### Render editors as components + +The Syncfusion Grid provides a powerful feature that allows you to dynamically render Syncfusion EJ2 controls as form editors during the editing process. This functionality is particularly useful when you want to provide feature-rich controls for data entry within the edit form. + +To achieve this by utilizing the [actionComplete](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event of the Grid and specifying `requestType` as **beginEdit** or **add**. -You can read, format and update the current editor value in the [`actionBegin`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event at the time of **requestType** as **save**. +The following code example illustrates rendering the [DropDownList](https://ej2.syncfusion.com/aspnetcore/documentation/drop-down-list/getting-started) component in the `actionComplete` event. -In the below code example, we have format and updated the **Freight** value. +```js -``` typescript + function actionComplete(args) { + if ((args.requestType === 'beginEdit' || args.requestType === 'add')) { + var countryData = ej.data.DataUtil.distinct(@Html.Raw(JsonConvert.SerializeObject(ViewBag.dataSource)), 'ShipCountry', true);; + new DropDownList({value: args.rowData.ShipCountry, popupHeight: '200px', floatLabelType: 'Always', + dataSource: countryData, fields: {text: 'ShipCountry', value: 'ShipCountry'}, placeholder: 'Ship Country'}, args.form.elements.namedItem('ShipCountry')); + } + } + +``` + +### Get value from editor + +The get value from editor feature in the Syncfusion Grid allows you to read, format, and update the current editor value before it is saved. This feature is particularly valuable when you need to perform specific actions on the data, such as formatting or validation, before it is committed to the underlying data source. + +To achieve this feature, you can utilize the [actionBegin](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event with the **requestType** set to **save**. + +In the following code example, the freight value has been formatted and updated. + +```ts function actionBegin(args) { if (args.requestType === 'save') { // cast string to integer value. @@ -92,12 +110,13 @@ In the below code example, we have format and updated the **Freight** value. ``` -## Set focus to editor +### Set focus to particular column editor -By default, the first input element in the dialog will be focused while opening the dialog. -If the first input element is in disabled or hidden state, focus the valid input element in the [`actionComplete`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event based on **requestType** as **beginEdit**. +The Syncfusion Grid allows you to control the focus behavior of input elements in edit forms. By default, the first input element in the dialog receives focus when the dialog is opened. However, in scenarios where the first input element is disabled or hidden, you can specify which valid input element should receive focus. This can be achieved using the [actionComplete](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event of the Grid, where the **requestType** is set to **beginEdit**. -```typescript +In the following code example, the CustomerID column focused. + +```ts function actionComplete(args) { // Set initail Focus @@ -108,13 +127,35 @@ If the first input element is in disabled or hidden state, focus the valid input ``` -## Adding validation rules for custom editors +### Disable default form validation + +The Syncfusion Grid provides built-in support for ASP.NET Core form validation to ensure data integrity and accuracy during editing. However, there might be scenarios where you want to disable the default form validation rules. This can be achieved using the `removeRules` method within the [actionComplete](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event of the Grid. -If you have used additional fields that are not present in the column model, then add the validation rules to the [`actionComplete`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event. +To disable default form validation rules in the Grid, follow these steps: ```typescript - function actionComplete(args) => { + function actionComplete: (args) { + if ((args.requestType === 'beginEdit' || args.requestType === 'add')) { + // Disable the Validation Rules + args.form.ej2_instances[0].removeRules(); + } + } + +``` +> * You can use this method to disable validation rules: **args.form.ej2_instances[0].rules = {}**. + +### Adding validation rules for custom editors + +The Syncfusion Grid provides the ability to add validation rules for fields that are not present in the column model. This feature is particularly useful to prevent erroneous or inconsistent data from being submitted, ultimately enhancing the reliability of your application's data. + +To accomplish this, you can utilize the [actionComplete](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ActionComplete) event along with the `addRules` method. + +Here's how you can use the `addRules` method to add validation rules for custom editors in the `actionComplete` event: + +```ts + + function actionComplete(args) { if ((args.requestType === 'beginEdit' || args.requestType === 'add')) { // Add Validation Rules args.form.ej2_instances[0].addRules('Freight', {max: 500}); @@ -123,13 +164,13 @@ If you have used additional fields that are not present in the column model, the ``` -## Render tab component inside the dialog template +## Render tab control inside the dialog template -You can use **tab** component inside dialog edit UI using dialog template feature. The dialog template feature can be enabled by defining [`mode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) as **Dialog** and [`template`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) as SCRIPT element ID or HTML string which holds the template. +You can enhance the editing experience in the Grid by rendering a [Tab](https://ej2.syncfusion.com/aspnetcore/documentation/tab/getting-started) component inside the dialog template. This feature is especially useful when you want to present multiple editing sections or categories in a tabbed layout, ensuring a more intuitive and easily navigable interface for data editing. -The following example demonstrate the usage of tab control inside the dialog template. +To enable this functionality, you need to set the [editSettings.mode](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Mode) property of the Grid to **Dialog**. This configures the Grid to use the dialog editing mode. Additionally, you can use the [editSettings.template](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridEditSettings.html#Syncfusion_EJ2_Grids_GridEditSettings_Template) property to define a template variable that contains the `Tab` component and its corresponding content. -{% if page.publishingplatform == "aspnet-core" %} +The following example renders a tab component inside the edit dialog. The tab component has two tabs, and once you fill in the first tab and navigate to the second one, the validation for the first tab is performed before navigating to the second. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -138,23 +179,7 @@ The following example demonstrate the usage of tab control inside the dialog tem {% highlight c# tabtitle="Dialog.cs" %} {% include code-snippet/grid/edit/tabediting/dialog.cs %} {% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/tabediting/dialog.cs %} -{% endhighlight %} {% endtabs %} -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/tabediting/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/tabediting/dialog.cs %} -{% endhighlight %} -{% highlight c# tabtitle="Dialog.cs" %} -{% include code-snippet/grid/edit/tabediting/dialog.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} +![Render tab control inside the dialog template](../images/editing/template-tab.gif) diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/validation.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/validation.md index 5c75b653fd..3b8e4e8cc4 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/validation.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/editing/validation.md @@ -9,63 +9,115 @@ documentation: ug --- -# Validation in Grid Control +# Validation in ASP.NET Core Grid component + +Validation is a crucial aspect of data integrity in any application. The ASP.NET Core Grid component in Syncfusion® provides built-in support for easy and effective data validation. This feature ensures that the data entered or modified adheres to predefined rules, preventing errors and guaranteeing the accuracy of the displayed information. ## Column validation -Column validation allows you to validate the edited or added row data and it display errors for invalid fields before saving data. Grid uses **Form Validator** component for column validation. You can set validation rules in [`validationRules`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_ValidationRules) property of [`e-grid-column`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html) tag helper. +Column validation allows you to validate the edited or added row data before saving it. This feature is particularly useful when you need to enforce specific rules or constraints on individual columns to ensure data integrity. By applying validation rules to columns, you can display error messages for invalid fields and prevent the saving of erroneous data. This feature leverages the **Form Validator** component to perform the validation. You can define validation rules using the `columns.validationRules` property to specify the criteria for validating column values. -{% if page.publishingplatform == "aspnet-core" %} +The following code example demonstrates how to define a validation rule for grid column: {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/columnvalid/tagHelper %} +{% include code-snippet/grid/edit/validation-columnvalid/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="Columnvalid.cs" %} -{% include code-snippet/grid/edit/columnvalid/columnvalid.cs %} +{% highlight c# tabtitle="columnvalid.cs" %} +{% include code-snippet/grid/edit/validation-columnvalid/columnvalid.cs %} {% endhighlight %} {% endtabs %} -{% elsif page.publishingplatform == "aspnet-mvc" %} +![Column validation](../images/editing/validation.png) + +## Custom validation + +The Custom validation feature is used to define and enforce your own validation rules for specific columns in the Grid. This is achieved by leveraging the utilizing the **Form Validator custom rules**, you can enforce your desired validation logic and display error messages for invalid fields. + +In the below demo, custom validation applied for **CustomerID** column. {% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/columnvalid/razor %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/validation-customvalidation/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="Columnvalid.cs" %} -{% include code-snippet/grid/edit/columnvalid/columnvalid.cs %} +{% highlight c# tabtitle="customvalidation.cs" %} +{% include code-snippet/grid/edit/validation-customvalidation/customvalidation.cs %} {% endhighlight %} {% endtabs %} -{% endif %} +![Custom validation](../images/editing/validation-custom.png) +### Custom validation based on dropdown change -## Custom validation +The Custom validation feature in the Grid allows you to apply validation rules and messages to a column based on the value of another column in edit mode. This feature is particularly useful when you need to enforce specific validation criteria that depend on the selection made in a dropdown column. -You can define your own custom validation rules for the specific columns by using **Form Validator custom rules**. +In the following sample, dropdownlist edit type is used for the **Role** and **Salary** columns. Here, you can apply the custom validation in the **Salary** column based on the value selected in the **Role** column. -In the below demo, custom validation applied for **CustomerID** column. +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/validation-dropdown-change/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="columnvalid.cs" %} +{% include code-snippet/grid/edit/validation-dropdown-change/columnvalid.cs %} +{% endhighlight %} +{% endtabs %} -{% if page.publishingplatform == "aspnet-core" %} +![Custom validation based on dropdown change](../images/editing/validation-dropdown.gif) + +### Custom validation for numeric column + +Custom validation for a numeric column Grid is useful when you want to enforce specific validation rules on numeric values in a column. This allows you to define your own validation logic and display custom error messages when the you enters invalid data. + +In the following example, custom validation functions, namely **customFunction** and **customFunctionOne**, are defined to check the entered numeric value against your validation criteria. Then, the grid column is configured with the appropriate validation settings using the **freightRules** object, specifying the custom validation functions along with corresponding error messages. Additionally, the [change](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Inputs.NumericTextBox.html#Syncfusion_EJ2_Inputs_NumericTextBox_Change) event of the numeric column is bound to the `validate` method of the form element through the edit params. This enables you to trigger validation and display error messages whenever the you modifies the value in the [NumericTextBox](https://ej2.syncfusion.com/aspnetcore/documentation/numerictextbox/getting-started). {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/customvalidation/tagHelper %} +{% include code-snippet/grid/edit/validation-numericcolumn/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="Customvalidation.cs" %} -{% include code-snippet/grid/edit/customvalidation/customvalidation.cs %} +{% highlight c# tabtitle="columnvalid.cs" %} +{% include code-snippet/grid/edit/validation-numericcolumn/columnvalid.cs %} {% endhighlight %} {% endtabs %} -{% elsif page.publishingplatform == "aspnet-mvc" %} +![Custom validation for numeric column](../images/editing/validation-numeric.png) + +## Dynamically add or remove validation rules from the form + +You can dynamically add or remove validation rules from input elements within a form. This feature is particularly useful when you need to adjust the validation rules based on different scenarios or dynamically changing data. + +To add validation rules dynamically to an input element, you can use the `addRules` method. This method enables you to add validation rules to the corresponding input element based on the name attribute. + +The following example to demonstrates how to dynamically add or remove a required validation rule for an input field based on a **CheckBox** selection: {% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/edit/customvalidation/razor %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/validation-add-remove/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="Customvalidation.cs" %} -{% include code-snippet/grid/edit/customvalidation/customvalidation.cs %} +{% highlight c# tabtitle="columnvalid.cs" %} +{% include code-snippet/grid/edit/validation-add-remove/columnvalid.cs %} {% endhighlight %} {% endtabs %} -{% endif %} + +![Dynamically add or remove validation rules from the form](../images/editing/validation-add-remove.png) + +> * To remove an existing validation rule from an input element, you can use the `removeRules` method. + +## Change the position of validation error message + +By default, the validation error message in Grid is displayed below the input field. However, you have an option to customize its position and display it in a different location. This feature is particularly useful when you want to align the error message according to your application's design and layout. + +To change the position of the validation error message in Grid, you can utilize the `customPlacement` event. This event allows you to define a custom logic to position the error message at the desired location. + +Here's an example that demonstrates how to change the position of the validation error message to the top of the input field: + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/edit/validation-position/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="validation.cs" %} +{% include code-snippet/grid/edit/validation-position/validation.cs %} +{% endhighlight %} +{% endtabs %} + +![Change the position of validation error message](../images/editing/validation-position.png) diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/add-params-for-filtering.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/add-params-for-filtering.md deleted file mode 100644 index 7cba6cdbbd..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/add-params-for-filtering.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: post -title: Add Params For Filtering in ##Platform_Name## Grid Component -description: Learn here all about Add Params For Filtering in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Add Params For Filtering -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Customizing Filter Dialog by using an additional Parameter - -You can customize the default settings of the components which are used in Menu filter by using params of filter property in column definition. -In the below sample, OrderID and Freight Columns are numeric columns, while open the filter dialog then you can see that NumericTextBox with spin button is displayed to change/set the filter value. Now using the params option we hide the spin button in NumericTextBox for OrderID Column. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/add-params-for-filtering/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Excelfilter.cs" %} -{% include code-snippet/grid/how-to/add-params-for-filtering/excelfilter.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/add-params-for-filtering/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Excelfilter.cs" %} -{% include code-snippet/grid/how-to/add-params-for-filtering/excelfilter.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/collapse-grouped-rows-at-initial-render.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/collapse-grouped-rows-at-initial-render.md deleted file mode 100644 index e71964eccc..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/collapse-grouped-rows-at-initial-render.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: post -title: Collapse Grouped Rows At Initial Render in ##Platform_Name## Grid Component -description: Learn here all about Collapse Grouped Rows At Initial Render in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Collapse Grouped Rows At Initial Render -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Collapse all grouped rows at initial render - -You can collapse all the grouped rows at initial rendering by using [`dataBound`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataBound) event with **collapseAll** method of the grid. - -In the below demo, all the grouped rows are collapsed at initial rendering. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/collapse-grouped-rows/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Collapseall.cs" %} -{% include code-snippet/grid/how-to/collapse-grouped-rows/collapseall.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/collapse-grouped-rows/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Collapseall.cs" %} -{% include code-snippet/grid/how-to/collapse-grouped-rows/collapseall.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/complex-column-as-foreign-key-column.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/complex-column-as-foreign-key-column.md deleted file mode 100644 index c10e37b678..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/complex-column-as-foreign-key-column.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: post -title: Complex Column As Foreign Key Column in ##Platform_Name## Grid Component -description: Learn here all about Complex Column As Foreign Key Column in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Complex Column As Foreign Key Column -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Set complex column as Foreignkey column - -The following example shows how to set the complex column as foreign key column. - -In the following example, **Employee.EmployeeID** is a complex column and also declared as a foreign column which shows **FirstName** column from foreign data. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/foreignkey/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Foreignkey.cs" %} -{% include code-snippet/grid/columns/foreignkey/foreignkey.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/foreignkey/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Foreignkey.cs" %} -{% include code-snippet/grid/columns/foreignkey/foreignkey.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/customize-pager-drop-down.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/customize-pager-drop-down.md deleted file mode 100644 index 66c77824df..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/customize-pager-drop-down.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: post -title: Customize Pager Drop Down in ##Platform_Name## Grid Component -description: Learn here all about Customize Pager Drop Down in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Customize Pager Drop Down -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Customize Pager DropDown - -To customize default values of pager dropdown, you need to define [`pageSizes`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridPageSettings.html#Syncfusion_EJ2_Grids_GridPageSettings_PageSizes) as array of strings. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/pagerdropdown/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Pagerdropdown.cs" %} -{% include code-snippet/grid/how-to/pagerdropdown/pagerdropdown.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/pagerdropdown/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Pagerdropdown.cs" %} -{% include code-snippet/grid/how-to/pagerdropdown/pagerdropdown.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/display-null-values-at-bottom.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/display-null-values-at-bottom.md deleted file mode 100644 index cb08d848e4..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/display-null-values-at-bottom.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: post -title: Display Null Values At Bottom in ##Platform_Name## Grid Component -description: Learn here all about Display Null Values At Bottom in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Display Null Values At Bottom -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Display the null date values at bottom of the Grid while perform sorting - -By default the null values are displayed at bottom of the Grid row while perform sorting in ascending order. As well as this values are displayed at top of the Grid row while perform sorting with descending order. But you can customize this default order to display the null values at always bottom row of the Grid by using [`sortComparer`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_SortComparer) property of [`e-grid-column`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html) tag helper. - -In the below code we have displayed the null date values at bottom of the Grid row while sorting the **OrderDate** column in both ways. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/sort-comparer/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Sort-comparer.cs" %} -{% include code-snippet/grid/how-to/sort-comparer/sort-comparer.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/sort-comparer/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Sort-comparer.cs" %} -{% include code-snippet/grid/how-to/sort-comparer/sort-comparer.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/enable-disable-grid-and-its-actions.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/enable-disable-grid-and-its-actions.md index 05596b4385..80093db9b4 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/enable-disable-grid-and-its-actions.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/enable-disable-grid-and-its-actions.md @@ -8,43 +8,36 @@ publishingplatform: ##Platform_Name## documentation: ug --- +# Enable disable grid and its actions in ASP.NET Core Grid component -# Enable/Disable Grid and its actions +You can enable or disable the Syncfusion® ASP.NET Core Grid and its actions by applying or removing specific CSS styles. This functionality is particularly useful in scenarios where interactions need to be restricted. Follow the steps below to implement this feature. -You can enable/disable the Grid and its actions by applying/removing corresponding CSS styles. - -To enable/disable the grid and its actions, follow the given steps: - -**Step 1**: - -Create CSS class with custom style to override the default style of Grid. +**Step 1**: Create CSS class with custom style to override the default style of Grid. ```css - .disablegrid { - pointer-events: none; - opacity: 0.4; - } - .wrapper { - cursor: not-allowed; - } + .disablegrid { + pointer-events: none; + opacity: 0.4; + } + .wrapper { + cursor: not-allowed; + } ``` -**Step 2**: - -Add/Remove the custom CSS class to the Grid in the click event handler of Button. +**Step 2**: Add/Remove the CSS class to the Grid in the click event handler of Button. ```typescript @@ -53,27 +46,13 @@ Add/Remove the custom CSS class to the Grid in the click event handler of Button In the below demo, the button click will enable/disable the Grid and its actions. -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/disablegrid/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Disablegrid.cs" %} -{% include code-snippet/grid/how-to/disablegrid/disablegrid.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - {% tabs %} {% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/disablegrid/razor %} +{% include code-snippet/grid/how-to/disablegrid/tagHelper %} {% endhighlight %} -{% highlight c# tabtitle="Disablegrid.cs" %} +{% highlight c# tabtitle="disablegrid.cs" %} {% include code-snippet/grid/how-to/disablegrid/disablegrid.cs %} {% endhighlight %} {% endtabs %} -{% endif %} - +![Enable disable grid and its actions](../images/howto-enable-disable.gif) diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/enable-editing-in-single-click.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/enable-editing-in-single-click.md deleted file mode 100644 index 38940dfa31..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/enable-editing-in-single-click.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -layout: post -title: Enable Editing In Single Click in Syncfusion ##Platform_Name## Grid Component -description: Learn here all about Enable Editing In Single Click in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Enable Editing In Single Click -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Enable editing in single click - -## Normal Editing - -You can make a row editable on a single click with **Normal** mode of editing in Grid, by using the **startEdit** and **endEdit** methods. - -Bind the **mouseup** event for Grid and in the event handler call the **startEdit** and **endEdit**, based on the clicked target element. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/single-click-inline-edit/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Single-click-normal-edit.cs" %} -{% include code-snippet/grid/how-to/single-click-inline-edit/single-click-normal-edit.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/single-click-inline-edit/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Single-click-normal-edit.cs" %} -{% include code-snippet/grid/how-to/single-click-inline-edit/single-click-normal-edit.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - - -### Open dropdown edit popup on single click - -You can open the default dropdown edit popup with single click edit by focusing the dropdown element and calling the EJ2 dropdown list's **showPopup** method in the Grid's **actionComplete** event. In this demo we have used a global flag variable in the **mouseup** event to ensure if the dropdown column is the clicked edit target. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/open-dropdown-popup/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Open-dropdown-popup.cs" %} -{% include code-snippet/grid/how-to/open-dropdown-popup/open-dropdown-popup.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/open-dropdown-popup/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Open-dropdown-popup.cs" %} -{% include code-snippet/grid/how-to/open-dropdown-popup/open-dropdown-popup.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/get-row-cell-index.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/get-row-cell-index.md deleted file mode 100644 index 7825979263..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/get-row-cell-index.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: post -title: Get Row Cell Index in ##Platform_Name## Grid Component -description: Learn here all about Get Row Cell Index in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Get Row Cell Index -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Get specific row and cell index in Grid - -You can get the specific row and cell index of the grid by using [`rowSelected`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_RowSelected) event of the grid. Here, we can get the row and cell index by using **aria-rowindex**(get row Index from **tr** element) and **aria-colindex**(column index from **td** element) attribute. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/row-cell-index/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Rowcellidx.cs" %} -{% include code-snippet/grid/how-to/row-cell-index/rowcellidx.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/row-cell-index/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Rowcellidx.cs" %} -{% include code-snippet/grid/how-to/row-cell-index/rowcellidx.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/grid-print.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/grid-print.md deleted file mode 100644 index e12d38e52e..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/grid-print.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: post -title: Grid Print in ##Platform_Name## Grid Component -description: Learn here all about Grid Print in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Grid Print -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Add a title to the header when using Grid print function - -You can add your title in the header through an [`beforePrint`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Grids.Grid~beforePrint.html) event. With the help of this event you can add your title element as you want. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/titleprint/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Titleprint.cs" %} -{% include code-snippet/grid/how-to/titleprint/titleprint.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/titleprint/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Titleprint.cs" %} -{% include code-snippet/grid/how-to/titleprint/titleprint.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/grouped-row-page-size.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/grouped-row-page-size.md deleted file mode 100644 index acf79c4fef..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/grouped-row-page-size.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: post -title: Grouped Row Page Size in ##Platform_Name## Grid Component -description: Learn here all about Grouped Row Page Size in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Grouped Row Page Size -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# How to show grouped rows based on the pageSize - -By default, we have displayed the no of records based on the [`pageSize`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridPageSettings.html#Syncfusion_EJ2_Grids_GridPageSettings_PageSize). If you want to show grouped column rows based on the [`pageSize`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridPageSettings.html#Syncfusion_EJ2_Grids_GridPageSettings_PageSize) then we suggest you to use the below way. - -In the below sample, we have overridden the default **generateQuery** to display the grouped rows instead of grid rows based on the [`pageSize`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridPageSettings.html#Syncfusion_EJ2_Grids_GridPageSettings_PageSize). - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/group-page-size/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Group-page-size.cs" %} -{% include code-snippet/grid/how-to/group-page-size/group-page-size.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/group-page-size/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Group-page-size.cs" %} -{% include code-snippet/grid/how-to/group-page-size/group-page-size.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/hide-sorting-in-excel-filter.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/hide-sorting-in-excel-filter.md deleted file mode 100644 index 6bb8e18305..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/hide-sorting-in-excel-filter.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -layout: post -title: Hide Sorting In Excel Filter in ##Platform_Name## Grid Component -description: Learn here all about Hide Sorting In Excel Filter in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Hide Sorting In Excel Filter -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Hide sorting options on excel filter Dialog - -You can hide the sorting options on the excel filter dialog by setting display as none for the following classes. - -```css - .e-excel-ascending, - .e-excel-descending, - .e-separator.e-excel-separator { - display: none; - } -``` - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/disable-sorting-excel/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Disable-sorting-excel.cs" %} -{% include code-snippet/grid/how-to/disable-sorting-excel/disable-sorting-excel.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/disable-sorting-excel/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Disable-sorting-excel.cs" %} -{% include code-snippet/grid/how-to/disable-sorting-excel/disable-sorting-excel.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/hide-the-expand-collapse-icon-in-parent-row.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/hide-the-expand-collapse-icon-in-parent-row.md deleted file mode 100644 index 2e217e3bef..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/hide-the-expand-collapse-icon-in-parent-row.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -layout: post -title: Hide The Expand Collapse Icon In Parent Row in ##Platform_Name## Grid Component -description: Learn here all about Hide The Expand Collapse Icon In Parent Row in Syncfusion ##Platform_Name## Grid component of syncfusion and more. -platform: ej2-asp-core-mvc -control: Hide The Expand Collapse Icon In Parent Row -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Hide the expand/collapse icon in parent row with no record in child grid - -By default, the expand/collapse icon will be visible even if the child grid is empty. - -You can use [`rowDataBound`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_RowDataBound) event to hide the icon when there are no records in child grid. - -To hide the expand/collapse icon in parent row when no records in child grid, follow the given steps: - -**Step 1**: - -Create CSS class with custom style to override the default style of Grid. - -```css - .e-row[aria-selected="true"] .e-customizedExpandcell { - background-color: #e0e0e0; - } - - .e-grid.e-gridhover tr[role='row']:hover { - background-color: #eee; - } - -``` - -**Step 2**: - -Add the CSS class to the Grid in the [`rowDataBound`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_RowDataBound) event handler of Grid. - -```typescript - - function rowDataBound(args) { - var filter = args.data.EmployeeID; - var data = new ej.data.DataManager(this.childGrid.dataSource).executeLocal(new ej.data.Query().where("EmployeeID", "equal", parseInt(filter), true)); - if (data.length == 0) { - //here hide which parent row has no child records - args.row.querySelector('td').innerHTML = " "; - args.row.querySelector('td').className = "e-customizedExpandcell"; - } - } - -``` - -In the below demo, the expand/collapse icon in the row with **EmployeeID** as **1** is hidden as it does not have record in child Grid. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/hidearrow/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Hidearrow.cs" %} -{% include code-snippet/grid/how-to/hidearrow/hidearrow.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/hidearrow/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Hidearrow.cs" %} -{% include code-snippet/grid/how-to/hidearrow/hidearrow.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/perform-crud-operation-using-anti-forgery-token.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/perform-crud-operation-using-anti-forgery-token.md index e8f4e1997d..35481912ae 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/perform-crud-operation-using-anti-forgery-token.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/perform-crud-operation-using-anti-forgery-token.md @@ -91,8 +91,6 @@ Now assign the custom adaptor to the grid as follows. ``` -{% if page.publishingplatform == "aspnet-core" %} - {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} {% include code-snippet/grid/how-to/anti-forgery-token/tagHelper %} @@ -102,18 +100,4 @@ Now assign the custom adaptor to the grid as follows. {% endhighlight %} {% endtabs %} -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/anti-forgery-token/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Anti-forgery-token.cs" %} -{% include code-snippet/grid/how-to/anti-forgery-token/anti-forgery-token.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - - N> You can find the full sample at our [GitHub repository](https://github.com/SyncfusionSamples/ej2-mvc-grid-antiforgerytoken). diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/print-the-expanded-state-from-other-pages.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/print-the-expanded-state-from-other-pages.md deleted file mode 100644 index 6723cba2fd..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/print-the-expanded-state-from-other-pages.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: post -title: Print The Expanded State From Other Pages in ##Platform_Name## Grid Component -description: Learn here all about Print The Expanded State From Other Pages in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Print The Expanded State From Other Pages -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Print the expanded state from other pages - -By default, the expanded child grids will be printed from the current page alone. You can print the expanded child grids from other pages by using the [`load`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Load) and [`actionBegin`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) event. - -In the following example, we have printed expanded child grids from other pages. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/hierarchyprint/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Hierarchyprint.cs" %} -{% include code-snippet/grid/how-to/hierarchyprint/hierarchyprint.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/hierarchyprint/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Hierarchyprint.cs" %} -{% include code-snippet/grid/how-to/hierarchyprint/hierarchyprint.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/render-both-ej1-and-ej2-grids-in-same-application.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/render-both-ej1-and-ej2-grids-in-same-application.md index 4217324d79..5b366d7fb0 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/render-both-ej1-and-ej2-grids-in-same-application.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/render-both-ej1-and-ej2-grids-in-same-application.md @@ -8,7 +8,6 @@ publishingplatform: ##Platform_Name## documentation: ug --- - # Render both EJ1 and EJ2 Grids in same application To achieve this requirement, you need to use the below code in **_Layout.cshtml** page. Because EJ1 and EJ2 has same library names to perform the different actions. So conflicts may occur when we refer this both controls in same application. To overcome this we need to extend this libraries in ej namespace. diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/select-grid-rows-based-on-certain-condition.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/select-grid-rows-based-on-certain-condition.md deleted file mode 100644 index 763193a9aa..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/select-grid-rows-based-on-certain-condition.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: post -title: Select Grid Rows Based On Certain Condition in ##Platform_Name## Grid Component -description: Learn here all about Select Grid Rows Based On Certain Condition in Syncfusion ##Platform_Name## Grid component of syncfusion and more. -platform: ej2-asp-core-mvc -control: Select Grid Rows Based On Certain Condition -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Select grid rows based on certain condition - -You can select the specific row in the grid based on a certain condition by using the **selectRows** method in the [`dataBound`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataBound) event of Grid. - -In the below demo, we have selected the grid rows only when **EmployeeID** column value greater than **3**. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/databasedselection/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Databasedselection.cs" %} -{% include code-snippet/grid/how-to/databasedselection/databasedselection.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/databasedselection/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Databasedselection.cs" %} -{% include code-snippet/grid/how-to/databasedselection/databasedselection.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/print.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/print.md index f3d15a99c0..b2b61463a4 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/print.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/print.md @@ -150,6 +150,38 @@ Here's a code example that demonstrates how to show a hidden column (CustomerID) ![Show or hide columns while printing](images/print/print-hide.png) +## Add a title to the header while printing + +You can add a title to the header when printing the Syncfusion® Grid by utilizing the [beforePrint](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_BeforePrint) event. This event allows you to customize the print layout, including the addition of a title element, ensuring that the printed document is informative and visually appealing. + +Here’s an example of how to add a title to your Grid when using the print function: + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/print/print-add-title/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="print.cs" %} +{% include code-snippet/grid/print/print-add-title/print.cs %} +{% endhighlight %} +{% endtabs %} + +## Print the expanded state from other pages + +By default, when printing, the Syncfusion® Grid component only includes the expanded child grids visible on the current page. However, you can enhance the printing functionality to include expanded child grids from other pages. This can be achieved using the [load](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Load) and [actionBegin](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ActionBegin) events, which help manage the expanded state of rows across different pages. + +The following example demonstrates how to print the expanded child grids from other pages: + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/grid/print/print-expanded-state/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Hierarchyprint.cs" %} +{% include code-snippet/grid/print/print-expanded-state/hierarchyprint.cs %} +{% endhighlight %} +{% endtabs %} + +![Retain grid styles while printing](images/print/print-style.png) + ## Limitations of printing large data Printing a large volume of data all at once in the grid can have certain limitations due to potential browser performance issues. Rendering numerous DOM elements on a single page can lead to browser slowdowns or even hang the browser. The grid offers a solution to manage extensive datasets through virtualization. However, it's important to note that virtualization for both rows and columns is not feasible during the printing process. diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/sorting.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/sorting.md index 55d44bd1a4..d72324797e 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/sorting.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/sorting.md @@ -116,10 +116,10 @@ The example below demonstrates how to display null values at the bottom of the g {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/sort-comparer/tagHelper %} +{% include code-snippet/grid/sorting/sort-comparer/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="sort-comparer.cs" %} -{% include code-snippet/grid/how-to/sort-comparer/sort-comparer.cs %} +{% include code-snippet/grid/sorting/sort-comparer/sort-comparer.cs %} {% endhighlight %} {% endtabs %} diff --git a/ej2-asp-core-mvc/grid/images/aggregates/aggregates-multiple.png b/ej2-asp-core-mvc/grid/images/aggregates/aggregates-multiple.png new file mode 100644 index 0000000000..5ba400d327 Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/aggregates/aggregates-multiple.png differ diff --git a/ej2-asp-core-mvc/grid/images/column-rendering/column-complex.png b/ej2-asp-core-mvc/grid/images/column-rendering/column-complex.png new file mode 100644 index 0000000000..7acbf597aa Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/column-rendering/column-complex.png differ diff --git a/ej2-asp-core-mvc/grid/images/column-rendering/column-foriegn-complex.png b/ej2-asp-core-mvc/grid/images/column-rendering/column-foriegn-complex.png new file mode 100644 index 0000000000..e4496aef99 Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/column-rendering/column-foriegn-complex.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/dialog-customize.png b/ej2-asp-core-mvc/grid/images/editing/dialog-customize.png new file mode 100644 index 0000000000..ed8badc555 Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/dialog-customize.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/dialog-edit.png b/ej2-asp-core-mvc/grid/images/editing/dialog-edit.png new file mode 100644 index 0000000000..1da61a27ad Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/dialog-edit.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/dialog-footer.png b/ej2-asp-core-mvc/grid/images/editing/dialog-footer.png new file mode 100644 index 0000000000..cc49b61a3c Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/dialog-footer.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/dialog-show-hide.png b/ej2-asp-core-mvc/grid/images/editing/dialog-show-hide.png new file mode 100644 index 0000000000..7db80d51e6 Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/dialog-show-hide.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/dialog-tabs-multiple.gif b/ej2-asp-core-mvc/grid/images/editing/dialog-tabs-multiple.gif new file mode 100644 index 0000000000..50ce58e02a Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/dialog-tabs-multiple.gif differ diff --git a/ej2-asp-core-mvc/grid/images/editing/edit-command.gif b/ej2-asp-core-mvc/grid/images/editing/edit-command.gif new file mode 100644 index 0000000000..0a3f1ac74e Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/edit-command.gif differ diff --git a/ej2-asp-core-mvc/grid/images/editing/edit-custom.png b/ej2-asp-core-mvc/grid/images/editing/edit-custom.png new file mode 100644 index 0000000000..8c1cc6235c Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/edit-custom.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/edit-types-upload.gif b/ej2-asp-core-mvc/grid/images/editing/edit-types-upload.gif new file mode 100644 index 0000000000..270228ad3f Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/edit-types-upload.gif differ diff --git a/ej2-asp-core-mvc/grid/images/editing/template-inline-add.png b/ej2-asp-core-mvc/grid/images/editing/template-inline-add.png new file mode 100644 index 0000000000..6da5aa18e4 Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/template-inline-add.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/template-inline-edit.png b/ej2-asp-core-mvc/grid/images/editing/template-inline-edit.png new file mode 100644 index 0000000000..4d15b18f0b Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/template-inline-edit.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/template-tab.gif b/ej2-asp-core-mvc/grid/images/editing/template-tab.gif new file mode 100644 index 0000000000..479ff7bf6c Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/template-tab.gif differ diff --git a/ej2-asp-core-mvc/grid/images/editing/validation-add-remove.png b/ej2-asp-core-mvc/grid/images/editing/validation-add-remove.png new file mode 100644 index 0000000000..f1f465cfbc Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/validation-add-remove.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/validation-custom.png b/ej2-asp-core-mvc/grid/images/editing/validation-custom.png new file mode 100644 index 0000000000..10ed7449c5 Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/validation-custom.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/validation-dropdown.gif b/ej2-asp-core-mvc/grid/images/editing/validation-dropdown.gif new file mode 100644 index 0000000000..79cf2f2da4 Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/validation-dropdown.gif differ diff --git a/ej2-asp-core-mvc/grid/images/editing/validation-numeric.png b/ej2-asp-core-mvc/grid/images/editing/validation-numeric.png new file mode 100644 index 0000000000..9cba0ddb24 Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/validation-numeric.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/validation-position.png b/ej2-asp-core-mvc/grid/images/editing/validation-position.png new file mode 100644 index 0000000000..d20c87fb13 Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/validation-position.png differ diff --git a/ej2-asp-core-mvc/grid/images/editing/validation.png b/ej2-asp-core-mvc/grid/images/editing/validation.png new file mode 100644 index 0000000000..cf08615d7f Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/editing/validation.png differ diff --git a/ej2-asp-core-mvc/grid/images/howto-enable-disable.gif b/ej2-asp-core-mvc/grid/images/howto-enable-disable.gif new file mode 100644 index 0000000000..d8a5ce55d1 Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/howto-enable-disable.gif differ diff --git a/ej2-asp-core-mvc/grid/images/print/print-another-page.png b/ej2-asp-core-mvc/grid/images/print/print-another-page.png new file mode 100644 index 0000000000..5705ea17cc Binary files /dev/null and b/ej2-asp-core-mvc/grid/images/print/print-another-page.png differ diff --git a/ej2-asp-core-mvc/list-box/drag-and-drop.md b/ej2-asp-core-mvc/list-box/drag-and-drop.md index 525105798a..9fb3830367 100644 --- a/ej2-asp-core-mvc/list-box/drag-and-drop.md +++ b/ej2-asp-core-mvc/list-box/drag-and-drop.md @@ -89,3 +89,37 @@ In the following sample, the `allowDragAndDrop` property is set as `true` and `s {% endtabs %} {% endif %} +## Dual ListBox with drag and drop + +{% if page.publishingplatform == "aspnet-core" %} + +The toolbar and drag and drop actions between two listboxes can be enabled by setting a listbox unique id and the same [`scope`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.DropDowns.ListBox.html#Syncfusion_EJ2_DropDowns_ListBox_Scope) property value. + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +The toolbar and drag and drop actions between two listboxes can be enabled by setting a listbox unique id and the same [`scope`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.DropDowns.ListBox.html#Syncfusion_EJ2_DropDowns_ListBox_Scope) property value. + +{% endif %} + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/listbox/drag-drop/dual-drag/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Dragdrop.cs" %} +{% include code-snippet/listbox/drag-drop/dual-drag/dualdraglistbox.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/listbox/drag-drop/dual-drag/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Dragdrop.cs" %} +{% include code-snippet/listbox/drag-drop/dual-drag/dualdraglistbox.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} \ No newline at end of file diff --git a/ej2-asp-core-mvc/maskedtextbox/EJ2_ASP.NETCORE/getting-started.md b/ej2-asp-core-mvc/maskedtextbox/EJ2_ASP.NETCORE/getting-started.md index adaf06ad86..0b651c3411 100644 --- a/ej2-asp-core-mvc/maskedtextbox/EJ2_ASP.NETCORE/getting-started.md +++ b/ej2-asp-core-mvc/maskedtextbox/EJ2_ASP.NETCORE/getting-started.md @@ -1,6 +1,6 @@ --- layout: post -title: Getting Started with ##Platform_Name## Maskedtextbox Control +title: Getting Started with ##Platform_Name## Maskedtextbox Control | Syncfusion description: Checkout and learn about getting started with ##Platform_Name## Maskedtextbox control of Syncfusion Essential JS 2 and more details. platform: ej2-asp-core-mvc control: Getting Started @@ -118,9 +118,9 @@ N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-Core-Ge ## See also -* [Getting Started with Syncfusion® ASP.NET Core using Razor Pages](https://ej2.syncfusion.com/aspnetcore/documentation/getting-started/razor-pages/) +* [Getting Started with Syncfusion® ASP.NET Core using Razor Pages](https://ej2.syncfusion.com/aspnetcore/documentation/getting-started/razor-pages) * [Getting Started with Syncfusion® ASP.NET Core MVC using Tag Helper](https://ej2.syncfusion.com/aspnetcore/documentation/getting-started/aspnet-core-mvc-taghelper) -* [How to perform custom validation using FormValidator](./how-to/perform-custom-validation-using-form-validator/) -* [How to customize the UI appearance of the control](./how-to/customize-the-ui-appearance-of-the-control/) -* [How to set cursor position while focus on the input textbox](./how-to/set-cursor-position-while-focus-on-the-input-textbox/) -* [How to display numeric keypad when focus on mobile devices](./how-to/display-numeric-keypad-when-focus-on-mobile-devices/) \ No newline at end of file +* [How to perform custom validation using FormValidator](./how-to/perform-custom-validation-using-form-validator) +* [How to customize the UI appearance of the control](./how-to/customize-the-ui-appearance-of-the-control) +* [How to set cursor position while focus on the input textbox](./how-to/set-cursor-position-while-focus-on-the-input-textbox) +* [How to display numeric keypad when focus on mobile devices](./how-to/display-numeric-keypad-when-focus-on-mobile-devices) \ No newline at end of file diff --git a/ej2-asp-core-mvc/multi-select/checkbox.md b/ej2-asp-core-mvc/multi-select/checkbox.md index 9f7a61a46a..9c2e750e2f 100644 --- a/ej2-asp-core-mvc/multi-select/checkbox.md +++ b/ej2-asp-core-mvc/multi-select/checkbox.md @@ -133,7 +133,7 @@ Using [enableSelectionOrder](https://help.syncfusion.com/cr/cref_files/aspnetcor ## See Also -* [How to bind the data](./data-binding/) -* [How to filter the bound data](./filtering/) -* [How to add custom value to the MultiSelect](./custom-value/) -* [How to render checkbox in grouping to the MultiSelect](./grouping/#grouping-with-checkbox). +* [How to bind the data](./data-binding) +* [How to filter the bound data](./filtering) +* [How to add custom value to the MultiSelect](./custom-value) +* [How to render checkbox in grouping to the MultiSelect](./grouping#grouping-with-checkbox). diff --git a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/import-export-annotation-object.md b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/import-export-annotation-object.md deleted file mode 100644 index 48a1a6d93e..0000000000 --- a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/import-export-annotation-object.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -layout: post -title: Import Export Annotation in EJ2 ASP.NET MVC PDF Viewer | Syncfusion -description: Learn how to Import Export Annotation Object in ASP.NET MVC PDF Viewer component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Import Export Annotation Object -publishingplatform: ej2-asp-core-mvc -documentation: ug ---- - - -# Import and Export annotation as object - -The PDF Viewer library allows you to import annotations from objects or streams instead of loading it as a file. To import such annotation objects, the PDF Viewer control must export the PDF annotations as objects using the [**ExportAnnotationsAsObject()**](https://ej2.syncfusion.com/documentation/api/pdfviewer/#exportannotationsasobject) method. Only the annotations objects that are exported from the PDF Viewer can be imported. - -The following steps are used to import and export annotation as object. - -**Step 1:** Follow the steps provided in the [link](https://ej2.syncfusion.com/aspnetmvc/documentation/pdfviewer/getting-started/) to create a simple PDF Viewer sample. - -**Step 2:** Use the following code snippet to perform import and export annotation. - -```html - - - - -``` - -Find the Sample, [how to import and export annotation as object](https://www.syncfusion.com/downloads/support/directtrac/general/ze/EJ2MvcSample-654457926.zip) \ No newline at end of file diff --git a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/import-export-annotation.md b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/import-export-annotation.md new file mode 100644 index 0000000000..5a9891a56e --- /dev/null +++ b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/import-export-annotation.md @@ -0,0 +1,55 @@ +--- +layout: post +title: Import Export Annotation in EJ2 ASP.NET MVC PDF Viewer | Syncfusion +description: Learn how to Import Export Annotation in ASP.NET MVC PDF Viewer component of Syncfusion Essential JS 2 and more. +platform: ej2-asp-core-mvc +control: Import Export Annotation Object +publishingplatform: ##Platform_Name## +documentation: ug +--- + + +# Import and Export annotation + +The PDF Viewer library allows you to import annotations from objects or streams instead of loading it as a file. To import such annotation objects, the PDF Viewer control must export the PDF annotations as objects using the [**ExportAnnotationsAsObject()**](https://ej2.syncfusion.com/documentation/api/pdfviewer/#exportannotationsasobject) method. Only the annotations objects that are exported from the PDF Viewer can be imported. + +The following steps are used to import and export annotations in various formats such as objects, JSON, and XFDF. + +**Step 1:** Follow the steps provided in the [link](https://ej2.syncfusion.com/aspnetmvc/documentation/pdfviewer/getting-started/) to create a simple PDF Viewer sample. + +**Step 2:** Use the following code snippet to perform import and export annotation. + +```html + + + + + + +``` + +[View sample in GitHub](https://github.com/SyncfusionExamples/mvc-pdf-viewer-examples/tree/master/How%20to) \ No newline at end of file diff --git a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/import-export-annotation-object.md b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/import-export-annotation.md similarity index 71% rename from ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/import-export-annotation-object.md rename to ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/import-export-annotation.md index b866d47642..99c9ec1624 100644 --- a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/import-export-annotation-object.md +++ b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/import-export-annotation.md @@ -1,6 +1,6 @@ --- layout: post -title: Import Export Annotation Object in ##Platform_Name## Pdfviewer Component +title: Import Export Annotation in ##Platform_Name## Pdfviewer Component | Syncfusion description: Learn here all about Import Export Annotation Object in Syncfusion ##Platform_Name## Pdfviewer component of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Import Export Annotation Object @@ -8,11 +8,11 @@ publishingplatform: ##Platform_Name## documentation: ug --- -# Import and Export annotation as object +# Import and Export annotation The PDF Viewer library allows you to import annotations from objects or streams instead of loading it as a file. To import such annotation objects, the PDF Viewer control must export the PDF annotations as objects using the [**ExportAnnotationsAsObject()**](https://ej2.syncfusion.com/documentation/api/pdfviewer/#exportannotationsasobject) method. Only the annotations objects that are exported from the PDF Viewer can be imported. -The following steps are used to import and export annotation as object. +The following steps are used to import and export annotations in various formats such as objects, JSON, and XFDF. **Step 1:** Follow the steps provided in the [link](https://ej2.syncfusion.com/aspnetcore/documentation/pdfviewer/getting-started/) to create a simple PDF Viewer sample. @@ -26,6 +26,8 @@ The following steps are used to import and export annotation as object. ViewData["Title"] = "Home page"; } + + @@ -38,7 +40,17 @@ The following steps are used to import and export annotation as object.