From a4629e148f683300652f06b3714155f598f1d57f Mon Sep 17 00:00:00 2001 From: SenthilarasuBalu <119287329+SenthilarasuBalu@users.noreply.github.com> Date: Mon, 8 Apr 2024 18:32:43 +0530 Subject: [PATCH 001/145] 866136: outline customization added --- .../styles/custom-outline/fabstyles.cs | 4 ++++ .../styles/custom-outline/razor | 11 +++++++++ .../styles/custom-outline/tagHelper | 11 +++++++++ .../EJ2_ASP.MVC/styles.md | 21 +++++++++++++++++- .../EJ2_ASP.NETCORE/styles.md | 16 +++++++++++++ .../images/FabOutline.png | Bin 0 -> 9015 bytes 6 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/fabstyles.cs create mode 100644 ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/razor create mode 100644 ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/tagHelper create mode 100644 ej2-asp-core-mvc/floating-action-button/images/FabOutline.png diff --git a/ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/fabstyles.cs b/ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/fabstyles.cs new file mode 100644 index 0000000000..598dfccffe --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/fabstyles.cs @@ -0,0 +1,4 @@ +public ActionResult FabStyles() +{ + return View(); +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/razor b/ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/razor new file mode 100644 index 0000000000..8a0706622d --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/razor @@ -0,0 +1,11 @@ +@using Syncfusion.EJ2.Buttons + +
+ @Html.EJS().Fab("fab").Target("#target").IconCss("e-icons e-people").Content("Contact").CssClass("custom-css").Render() +
+ \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/tagHelper b/ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/tagHelper new file mode 100644 index 0000000000..dac66fd79b --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/floating-action-button/styles/custom-outline/tagHelper @@ -0,0 +1,11 @@ +@using Syncfusion.EJ2.Buttons + +
+ +
+ \ No newline at end of file diff --git a/ej2-asp-core-mvc/floating-action-button/EJ2_ASP.MVC/styles.md b/ej2-asp-core-mvc/floating-action-button/EJ2_ASP.MVC/styles.md index 96fd3c00a5..7613d60ed0 100644 --- a/ej2-asp-core-mvc/floating-action-button/EJ2_ASP.MVC/styles.md +++ b/ej2-asp-core-mvc/floating-action-button/EJ2_ASP.MVC/styles.md @@ -70,4 +70,23 @@ By using [CssClass](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2. {% endif %} -![Asp.Net MVC Floating Action Button control with Hover](images/onhover.png) \ No newline at end of file +![Asp.Net MVC Floating Action Button control with Hover](images/onhover.png) + +## Customized outlines + +By using the [CssClass](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.Fab.html#Syncfusion_EJ2_Buttons_Fab_CssClass) property, you can customize the outline of the Floating Action Button, providing increased flexibility to adjust its appearance according to your preferences. + +{% if page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/floating-action-button/styles/custom-outline/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Fabstyles.cs" %} +{% include code-snippet/floating-action-button/styles/custom-outline/fabstyles.cs %} +{% endhighlight %} +{% endtabs %} + +{% endif %} + +![Asp.Net MVC Floating Action Button control with Outline](images/FabOutline.png) \ No newline at end of file diff --git a/ej2-asp-core-mvc/floating-action-button/EJ2_ASP.NETCORE/styles.md b/ej2-asp-core-mvc/floating-action-button/EJ2_ASP.NETCORE/styles.md index 8e33b498b1..60e224d95f 100644 --- a/ej2-asp-core-mvc/floating-action-button/EJ2_ASP.NETCORE/styles.md +++ b/ej2-asp-core-mvc/floating-action-button/EJ2_ASP.NETCORE/styles.md @@ -66,3 +66,19 @@ By using [CssClass](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2 {% endif %} ![Asp.Net Core Floating Action Button control with Hover](images/onhover.png) + +## Customized outlines + +By using the [CssClass](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Buttons.Fab.html#Syncfusion_EJ2_Buttons_Fab_CssClass) property, you can customize the outline of the Floating Action Button, providing increased flexibility to adjust its appearance according to your preferences. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/floating-action-button/styles/custom-outline/tagHelper %} +{% endhighlight %} +{% endtabs %} + +{% endif %} + +![Asp.Net Core Floating Action Button control with Outline](images/FabOutline.png) \ No newline at end of file diff --git a/ej2-asp-core-mvc/floating-action-button/images/FabOutline.png b/ej2-asp-core-mvc/floating-action-button/images/FabOutline.png new file mode 100644 index 0000000000000000000000000000000000000000..b2bd15457b52698f4f688ab123e9237f581d4126 GIT binary patch literal 9015 zcmeHtS6EZq)^^m5g(4mcs0i2qK|)kEAYGA;6a@ky5M%>VLX)PH1Qh`lK{`lPst6&H z5ITv%rk4mvkeZEjAp}DSNl5Z9&bj>ltMBT&I2Y?#&sv#TbIvixe8+g-F<)6(7>Nj; z6$F7mA|}TA_d%e2gTSSC_#p76>iS|RaN8Gj-$)NsHE?bjc=*HPw)t%ksQRtYu8RQh zd?dga76bx`$?RSGOzvM^2Z1j3ndslPd4ix#`TIDIhAsY%J8p14%H&-sFDBWbJMf}c z>eKD;nX`s?Bm zeM0lC{+x6$_S|<&+TTcp>c4t2yzU)0=T;jhf7e~p%4B|!lA6{GS`3IS{F{F0X8mGr zgvZAx`MJ{cym!5^SM93a2!TK!$DaoSw@>;n_k)g=&-@yxa2yZ-o!{?K2m$2Y7$Nt;!f7<)M=J~Jp{Etoef50ie`%jemAb;8@Ah zUr?_Po1Azl>tdIOI9?9a8}|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FNH61d>_N{ z@!{-VpMj?5Z2X5IS*gLy;tDFhi%Mf%sd})WEKP>qfEu|2O*E#u^^Z6t3+INfiGT!b z9e&jK&sGxsRk4}7o1EydI&`l$FU%7^%s?DkiNk(a!;jwdLF=qurK-V#MumWb4-YH5 z-nlkBn!b^y=C43ALY+KPy`J@MudtvUpf3KUvRw9XTZ6Y$d;``K^iWbwymk2BujT7@ zVt_)J1SdnyGKT}E6NDC9D%Dffbj9}ymZd{_r`MQ42HS&vxepl&w$sh>b^cX*wskCN zCvSU5&N9=H^=KU8ZL^p{9oc4FHxu~VuhOo+JUe%w`jlB<#IHYXR~sb0L+)A1j`q{D zbJ%YcYD4HG%K*Lrn-%{d5dsugClx~g6sq^z)eA3zly->|2h@g Date: Fri, 3 May 2024 10:30:46 +0530 Subject: [PATCH 002/145] 883856: commit --- .../how-to/restricting-zoom-in-mobile-mode.md | 57 ++++++++++++++++ .../how-to/restricting-zoom-in-mobile-mode.md | 65 +++++++++++++++++++ ej2-asp-core-toc.html | 1 + ej2-asp-mvc-toc.html | 1 + 4 files changed, 124 insertions(+) create mode 100644 ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/restricting-zoom-in-mobile-mode.md create mode 100644 ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/restricting-zoom-in-mobile-mode.md diff --git a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/restricting-zoom-in-mobile-mode.md b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/restricting-zoom-in-mobile-mode.md new file mode 100644 index 0000000000..1d8bdfc1f5 --- /dev/null +++ b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/restricting-zoom-in-mobile-mode.md @@ -0,0 +1,57 @@ +--- +layout: post +title: Restrict Zoom Percentage in EJ2 ASP.NET MVC PDF Viewer | Syncfusion +description: Learn here all how to restrict zoom percentage in ASP.NET MVC PDF Viewer component of Syncfusion Essential JS 2 and more. +platform: ej2-asp-core-mvc +control: PDF Viewer +publishingplatform: ##Platform_Name## +documentation: ug +--- + +# How to Restrict Zoom Percentage on Mobile Devices + +In Syncfusion PDF Viewer, you can easily restrict the zoom percentage on mobile devices using the **maxZoom** and **minZoom** property. This feature allows you to set specific limits for zooming, ensuring smoother scrolling performance and efficient document loading, on mobile devices. + +{% tabs %} +{% highlight html tabtitle="Standalone" %} + +
+ @Html.EJS().PdfViewer("pdfviewer").DocumentLoad("documentLoad").DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").Render() +
+ + + +{% endhighlight %} +{% highlight html tabtitle="Server-Backed" %} + +
+ @Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/api/PdfViewer/")).DocumentLoad("documentLoad").DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").Render() +
+ + +{% endhighlight %} +{% endtabs %} + +By implementing this, you ensure that the maximum zoom percentage on mobile devices is limited to 200% and the minimum zoom percentage is set to 10%. This prevents performance issues that may arise from excessive zooming on mobile platforms. \ No newline at end of file diff --git a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/restricting-zoom-in-mobile-mode.md b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/restricting-zoom-in-mobile-mode.md new file mode 100644 index 0000000000..5f31bc44de --- /dev/null +++ b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/restricting-zoom-in-mobile-mode.md @@ -0,0 +1,65 @@ +--- +layout: post +title: Restrict Zoom Percentage in ##Platform_Name## PDF Viewer Component| Syncfusion +description: Learn here all about how to restrict zoom percentage in Syncfusion ##Platform_Name## PDF Viewer component of Syncfusion Essential JS 2 and more. +platform: ej2-asp-core-mvc +control: PDF Viewer +publishingplatform: ##Platform_Name## +documentation: ug +--- + +# How to Restrict Zoom Percentage on Mobile Devices + +In Syncfusion PDF Viewer, you can easily restrict the zoom percentage on mobile devices using the **maxZoom** and **minZoom** property. This feature allows you to set specific limits for zooming, ensuring smoother scrolling performance and efficient document loading, on mobile devices. + +{% tabs %} +{% highlight html tabtitle="Standalone" %} + +
+ + +
+ + + +{% endhighlight %} +{% highlight html tabtitle="Server-Backed" %} + +
+ + +
+ + + +{% endhighlight %} +{% endtabs %} + +By implementing this, you ensure that the maximum zoom percentage on mobile devices is limited to 200% and the minimum zoom percentage is set to 10%. This prevents performance issues that may arise from excessive zooming on mobile platforms. \ No newline at end of file diff --git a/ej2-asp-core-toc.html b/ej2-asp-core-toc.html index 2595f7fa70..719a9df5fd 100644 --- a/ej2-asp-core-toc.html +++ b/ej2-asp-core-toc.html @@ -1856,6 +1856,7 @@
  • Load N number of pages on initial loading
  • Retry Timeout
  • Customize toolbar
  • +
  • Restrict Zoom Percentage on Mobile Devices
  • Troubleshooting diff --git a/ej2-asp-mvc-toc.html b/ej2-asp-mvc-toc.html index b48aa68b2c..fe908bb131 100644 --- a/ej2-asp-mvc-toc.html +++ b/ej2-asp-mvc-toc.html @@ -1816,6 +1816,7 @@
  • Load N number of pages on initial loading
  • Retry Timeout
  • Customize toolbar
  • +
  • Restrict Zoom Percentage on Mobile Devices
  • Troubleshooting From c49df9dba34c03c612ebbc793db4532e43caf4e8 Mon Sep 17 00:00:00 2001 From: ArunKumar-SF3979 Date: Mon, 3 Jun 2024 19:05:11 +0530 Subject: [PATCH 003/145] 889191: Drafted a content for csp. --- .../content-security-policy.md | 78 +++++++++++++++++++ .../EJ2_ASP.NETCORE/security-aspects.md | 58 -------------- 2 files changed, 78 insertions(+), 58 deletions(-) create mode 100644 ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/content-security-policy.md diff --git a/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/content-security-policy.md b/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/content-security-policy.md new file mode 100644 index 0000000000..3ea4714093 --- /dev/null +++ b/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/content-security-policy.md @@ -0,0 +1,78 @@ +--- +layout: post +title: Content Security Policy in ##Platform_Name## Common Control | Syncfusion +description: Learn here all about Content Security Policy in Syncfusion ##Platform_Name## Common control of Syncfusion Essential JS 2 and more. +platform: ej2-asp-core-mvc +control: Common +publishingplatform: ##Platform_Name## +documentation: ug +--- + +# Content Security Policy + +Content Security Policy (CSP) is a security feature implemented by web browsers to protect against attacks such as cross-site scripting (XSS) and data injection. It limits the sources from which content can be loaded on a web page. To enable strict Content Security Policy (CSP), certain browser features are disabled by default. To use Syncfusion controls with strict CSP mode, it is essential to include the following directives: + +Nonce attribute is used in CSP to validate requests and prevent attackers from injecting JavaScript code into a web application. + + +## Steps to Create and Include the Nonce Attribute in an ASP.NET Core Application + +* Generate the `nonce` attribute value by adding the below code in **Program.cs** file. + +* Syncfusion material and tailwind built-in themes contain a reference to the Roboto’s external font, which is also blocked. To allow them, add the external font reference to the style-src and font-src directives in the above meta tag. + +{% tabs %} +{% highlight c# tabtitle="Program.cs" %} + +using System.Security.Cryptography; + +... +app.Use(async (context, next) => +{ + RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); + byte[] nonceBytes = new byte[32]; + rng.GetBytes(nonceBytes); + string nonceValue = Convert.ToBase64String(nonceBytes); + context.Items.Add("ScriptNonce", nonceValue); + context.Response.Headers.Add("Content-Security-Policy", string.Format( + "script-src 'self' 'unsafe-inline' 'nonce-{0}' https://cdn.syncfusion.com;" + + "style-src-elem 'self' 'unsafe-inline' https://cdn.syncfusion.com https://fonts.googleapis.com;" + + "font-src 'self' data: https://fonts.gstatic.com;" + + "object-src 'none';", nonceValue)); + await next(); +}); + + +{% endhighlight %} +{% endtabs %} + +* Open **_Layout.cshtml** file and add `nonce` attribute in the client side resources like below, + +{% tabs %} +{% highlight c# tabtitle="~/_Layout.cshtml" %} + + ... + + + +{% endhighlight %} +{% endtabs %} + +* Set `add-nonce` for `ejs-scripts` while registering the script manager at the end of `` of **_Layout.cshtml** file as follows, + +{% tabs %} +{% highlight c# tabtitle="~/_Layout.cshtml" %} + + ... + + + +{% endhighlight %} +{% endtabs %} + +N> The `unsafe-eval` directive needs to be added in script-src for samples that use the template properties. + +* Run the application then see the DOM, nonce attribute is added in script tag and it's value hidden for security purpose. + + + diff --git a/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/security-aspects.md b/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/security-aspects.md index c803ee765a..2748b32205 100644 --- a/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/security-aspects.md +++ b/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/security-aspects.md @@ -41,64 +41,6 @@ The following list demonstrates the Syncfusion ASP.NET Core controls that are su * [Tooltip](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Popups.Tooltip.html#Syncfusion_EJ2_Popups_Tooltip_EnableHtmlSanitizer) * [TreeView](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Navigations.TreeView.html#Syncfusion_EJ2_Navigations_TreeView_EnableHtmlSanitizer) -## Adding Nonce to Script tag in ASP.NET Core - -`Nonce` attribute is used in content security policy to find out whether given request is valid or not and it prevents the attackers injecting the javascript code in a web application. - -The following steps demonstrates how to create and include the nonce attribute in ASP.NET Core application. - -* Generate the `nonce` attribute value by adding the below code in **Program.cs** file. - -{% tabs %} -{% highlight c# tabtitle="Program.cs" %} - -using System.Security.Cryptography; - -... -app.Use(async (context, next) => -{ - RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); - byte[] nonceBytes = new byte[32]; - rng.GetBytes(nonceBytes); - string nonceValue = Convert.ToBase64String(nonceBytes); - context.Items.Add("ScriptNonce", nonceValue); - context.Response.Headers.Add("Content-Security-Policy", string.Format( - "script-src 'self' 'nonce-{0}' cdn.syncfusion.com;" + - "style-src-elem 'self' cdn.syncfusion.com fonts.googleapis.com;" + - "font-src 'self' data: fonts.gstatic.com;" + - "object-src 'none';", nonceValue)); - await next(); -}); - -{% endhighlight %} -{% endtabs %} - -* Open **_Layout.cshtml** file and add `nonce` attribute in the client side resources like below, - -{% tabs %} -{% highlight c# tabtitle="~/_Layout.cshtml" %} - - ... - - - -{% endhighlight %} -{% endtabs %} - -* Set `add-nonce` for `ejs-scripts` while registering the script manager at the end of `` of **_Layout.cshtml** file as follows, - -{% tabs %} -{% highlight c# tabtitle="~/_Layout.cshtml" %} - - ... - - - -{% endhighlight %} -{% endtabs %} - -* Run the application then see the DOM, nonce attribute is added in script tag and it's value hidden for security purpose. - ## See also * [Develop an ASP.NET Core web application securely](https://www.syncfusion.com/blogs/post/10-practices-secure-asp-net-core-mvc-app.aspx) From dbb03691a24312de945cba6b7b1e32c63ded01c1 Mon Sep 17 00:00:00 2001 From: ArunKumar-SF3979 Date: Mon, 3 Jun 2024 19:09:33 +0530 Subject: [PATCH 004/145] 889191: Drafted a content for csp. --- ej2-asp-core-toc.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ej2-asp-core-toc.html b/ej2-asp-core-toc.html index 85ee576761..445c4acb4f 100644 --- a/ej2-asp-core-toc.html +++ b/ej2-asp-core-toc.html @@ -107,6 +107,7 @@
  • Drag and Drop
  • EJ1 and EJ2 Compatibility
  • +
  • Content Security Policy
  • Cross-Site Scripting(XSS)
  • Areas in ASP.NET Core
  • Deployment
  • From da55b8f65a68b828345b8df04f149682eacdaa4e Mon Sep 17 00:00:00 2001 From: ArunKumar-SF3979 Date: Thu, 6 Jun 2024 11:11:37 +0530 Subject: [PATCH 005/145] 889191: Drafted a content for csp. --- .../common/EJ2_ASP.NETCORE/content-security-policy.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/content-security-policy.md b/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/content-security-policy.md index 3ea4714093..3255a023fa 100644 --- a/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/content-security-policy.md +++ b/ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/content-security-policy.md @@ -12,14 +12,14 @@ documentation: ug Content Security Policy (CSP) is a security feature implemented by web browsers to protect against attacks such as cross-site scripting (XSS) and data injection. It limits the sources from which content can be loaded on a web page. To enable strict Content Security Policy (CSP), certain browser features are disabled by default. To use Syncfusion controls with strict CSP mode, it is essential to include the following directives: -Nonce attribute is used in CSP to validate requests and prevent attackers from injecting JavaScript code into a web application. +`nonce` attribute is used in CSP to validate requests and prevent attackers from injecting JavaScript code into a web application. ## Steps to Create and Include the Nonce Attribute in an ASP.NET Core Application * Generate the `nonce` attribute value by adding the below code in **Program.cs** file. -* Syncfusion material and tailwind built-in themes contain a reference to the Roboto’s external font, which is also blocked. To allow them, add the external font reference to the style-src and font-src directives in the above meta tag. +* Syncfusion material and tailwind built-in themes contain a reference to the Roboto’s external font, which is also blocked. To allow them, add the external font reference to the `style-src` and `font-src` directives in the above meta tag. {% tabs %} {% highlight c# tabtitle="Program.cs" %} @@ -70,9 +70,9 @@ app.Use(async (context, next) => {% endhighlight %} {% endtabs %} -N> The `unsafe-eval` directive needs to be added in script-src for samples that use the template properties. +N> The `unsafe-eval` directive needs to be added in `script-src` for controls which uses the templates. -* Run the application then see the DOM, nonce attribute is added in script tag and it's value hidden for security purpose. +* Run the application then see the DOM, `nonce` attribute is added in script tag and it's value hidden for security purpose. From b6f45e772aff07bb466de39a170fe4ebbe4b4467 Mon Sep 17 00:00:00 2001 From: DinakarSF4212 <147583019+DinakarSF4212@users.noreply.github.com> Date: Thu, 6 Jun 2024 15:23:42 +0530 Subject: [PATCH 006/145] 889454: Moved print,filter,sort and import export to relevant sections. --- ej2-asp-core-mvc/spreadsheet/filter.md | 29 ++++++++ .../spreadsheet/how-to/get-filtered-rows.md | 38 ----------- ...t-an-excel-document-using-file-uploader.md | 38 ----------- ...mmatically-and-make-it-the-active-sheet.md | 38 ----------- ej2-asp-core-mvc/spreadsheet/how-to/print.md | 37 ----------- ...-open-spreadsheet-data-as-base64-string.md | 40 ----------- .../how-to/sort-a-range-by-custom-list.md | 47 ------------- ...ng => external-reference-dialog-alert.png} | Bin ej2-asp-core-mvc/spreadsheet/open-save.md | 62 +++++++++++++++++- ej2-asp-core-mvc/spreadsheet/sort.md | 29 ++++++++ ej2-asp-core-mvc/spreadsheet/worksheet.md | 56 ++++++++++++++++ ej2-asp-core-toc.html | 6 -- ej2-asp-mvc-toc.html | 6 -- 13 files changed, 175 insertions(+), 251 deletions(-) delete mode 100644 ej2-asp-core-mvc/spreadsheet/how-to/get-filtered-rows.md delete mode 100644 ej2-asp-core-mvc/spreadsheet/how-to/import-an-excel-document-using-file-uploader.md delete mode 100644 ej2-asp-core-mvc/spreadsheet/how-to/insert-sheet-programmatically-and-make-it-the-active-sheet.md delete mode 100644 ej2-asp-core-mvc/spreadsheet/how-to/print.md delete mode 100644 ej2-asp-core-mvc/spreadsheet/how-to/save-and-open-spreadsheet-data-as-base64-string.md delete mode 100644 ej2-asp-core-mvc/spreadsheet/how-to/sort-a-range-by-custom-list.md rename ej2-asp-core-mvc/spreadsheet/images/{external-reference-dialog-alert .png => external-reference-dialog-alert.png} (100%) diff --git a/ej2-asp-core-mvc/spreadsheet/filter.md b/ej2-asp-core-mvc/spreadsheet/filter.md index 4891e78e5f..d761de44b1 100644 --- a/ej2-asp-core-mvc/spreadsheet/filter.md +++ b/ej2-asp-core-mvc/spreadsheet/filter.md @@ -66,6 +66,35 @@ The following code example shows `filter` functionality in the Spreadsheet contr To apply a filter for a cell value, right-click the cell and choose filter -> `Filter By Selected Cell's Value` option from the menu. It applies the filter based on the value of the selected cell in the current sheet. +## Get the filtered rows in ##Platform_Name## Spreadsheet control + +Filtering allows you to view specific rows in a spreadsheet while hiding the others. The [allowFiltering](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFiltering) property allows you to enable or disable filtering functionality through the UI. You can also use the [allowFiltering](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFiltering) property and `applyFilter` method combination to filter data via code behind. The filtered rows can be identified by iterating through the row collection on the sheet and using the `isFiltered` property available in each row object. + +The following code example shows how to get the filtered rows. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/filter-cs1/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="InsertSheetController.cs" %} +{% include code-snippet/spreadsheet/filter-cs1/filterController.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/filter-cs1/razor %} +{% endhighlight %} +{% highlight c# tabtitle="InsertSheetController.cs" %} +{% include code-snippet/spreadsheet/filter-cs1/filterController.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + ## Clear filter After applying filter to a certain column, you may want to clear it to make all filtered rows visible again. It can be done in the following ways, diff --git a/ej2-asp-core-mvc/spreadsheet/how-to/get-filtered-rows.md b/ej2-asp-core-mvc/spreadsheet/how-to/get-filtered-rows.md deleted file mode 100644 index dfe30d04bc..0000000000 --- a/ej2-asp-core-mvc/spreadsheet/how-to/get-filtered-rows.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: post -title: Get the filtered rows in ##Platform_Name## Spreadsheet control | Syncfusion -description: Learn here all about how to get the filtered rows in Syncfusion ##Platform_Name## Spreadsheet control of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Spreadsheet -publishingplatform: ##Platform_Name## -documentation: ug ---- - -## Get the filtered rows in ##Platform_Name## Spreadsheet control - -Filtering allows you to view specific rows in a spreadsheet while hiding the others. The [allowFiltering](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFiltering) property allows you to enable or disable filtering functionality through the UI. You can also use the [allowFiltering](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFiltering) property and `applyFilter` method combination to filter data via code behind. The filtered rows can be identified by iterating through the row collection on the sheet and using the `isFiltered` property available in each row object. - -The following code example shows how to get the filtered rows. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/filter-cs1/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="InsertSheetController.cs" %} -{% include code-snippet/spreadsheet/filter-cs1/filterController.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/filter-cs1/razor %} -{% endhighlight %} -{% highlight c# tabtitle="InsertSheetController.cs" %} -{% include code-snippet/spreadsheet/filter-cs1/filterController.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} diff --git a/ej2-asp-core-mvc/spreadsheet/how-to/import-an-excel-document-using-file-uploader.md b/ej2-asp-core-mvc/spreadsheet/how-to/import-an-excel-document-using-file-uploader.md deleted file mode 100644 index 8187b9b5cd..0000000000 --- a/ej2-asp-core-mvc/spreadsheet/how-to/import-an-excel-document-using-file-uploader.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: post -title: Import an excel document using file uploader in ##Platform_Name## Spreadsheet Control | Syncfusion -description: Learn here all about import an excel document using file uploader in Syncfusion ##Platform_Name## Spreadsheet component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Spreadsheet -publishingplatform: ##Platform_Name## -documentation: ug ---- - -## Import an excel document using file uploader in ##Platform_Name## Spreadsheet control - -If you explore your machine to select and upload an excel document using the file uploader, you will receive the uploaded document as a raw file in the `success` event of the file uploader. In this `success` event, you should pass the received raw file as an argument to the Spreadsheet's `open` method to see the appropriate output. - -The following code example shows how to import an excel document using file uploader in spreadsheet. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/open-uploader/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Opencontroller.cs" %} -{% include code-snippet/spreadsheet/open-uploader/opencontroller.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/open-uploader/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Opencontroller.cs" %} -{% include code-snippet/spreadsheet/open-uploader/opencontroller.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} diff --git a/ej2-asp-core-mvc/spreadsheet/how-to/insert-sheet-programmatically-and-make-it-the-active-sheet.md b/ej2-asp-core-mvc/spreadsheet/how-to/insert-sheet-programmatically-and-make-it-the-active-sheet.md deleted file mode 100644 index e09d049178..0000000000 --- a/ej2-asp-core-mvc/spreadsheet/how-to/insert-sheet-programmatically-and-make-it-the-active-sheet.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: post -title: Insert a sheet programmatically and make the inserted sheet as the active sheet in ##Platform_Name## Spreadsheet control | Syncfusion -description: Learn here all about insert a sheet programmatically and make the inserted sheet as the active sheet in Syncfusion ##Platform_Name## Spreadsheet control of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Spreadsheet -publishingplatform: ##Platform_Name## -documentation: ug ---- - -## Insert a sheet programmatically and make it the active sheet in ##Platform_Name## Spreadsheet control - -A sheet is a collection of cells organized in the form of rows and columns that allows you to store, format, and manipulate the data. Using `insertSheet` method, you can insert one or more sheets at the desired index. Then, you can make the inserted sheet as active sheet by focusing the start cell of that sheet using the `goTo` method. - -The following code example shows how to insert a sheet programmatically and make it the active sheet. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="InsertSheetController.cs" %} -{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet/insertSheetController.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet/razor %} -{% endhighlight %} -{% highlight c# tabtitle="InsertSheetController.cs" %} -{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet/insertSheetController.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} diff --git a/ej2-asp-core-mvc/spreadsheet/how-to/print.md b/ej2-asp-core-mvc/spreadsheet/how-to/print.md deleted file mode 100644 index 05a9191c8f..0000000000 --- a/ej2-asp-core-mvc/spreadsheet/how-to/print.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: post -title: Print in ##Platform_Name## Spreadsheet Control | Syncfusion -description: Learn here all about Print in Syncfusion ##Platform_Name## Spreadsheet component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Print -publishingplatform: ##Platform_Name## -documentation: ug ---- - -# Print in Spreadsheet Control - -You can use the `print` method by importing from ej2-base package. Here, the `Select` event in the dropdown and the `dataBound` event are used to print the single/multiple sheets of data. To print the single/multiple sheets, use the dropdown button and select the `Print` (or) `Print All` option. In the following sample, you can be able to print the single/multiple sheets. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/print/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="PrintController.cs" %} -{% include code-snippet/spreadsheet/print/printController.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/print/razor %} -{% endhighlight %} -{% highlight c# tabtitle="PrintController.cs" %} -{% include code-snippet/spreadsheet/print/printController.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/spreadsheet/how-to/save-and-open-spreadsheet-data-as-base64-string.md b/ej2-asp-core-mvc/spreadsheet/how-to/save-and-open-spreadsheet-data-as-base64-string.md deleted file mode 100644 index 0751670028..0000000000 --- a/ej2-asp-core-mvc/spreadsheet/how-to/save-and-open-spreadsheet-data-as-base64-string.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: post -title: Save and open Spreadsheet data as a Base64 string in ##Platform_Name## Spreadsheet control | Syncfusion -description: Learn here all about save and open Spreadsheet data as a Base64 string in Syncfusion ##Platform_Name## Spreadsheet control of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Spreadsheet -publishingplatform: ##Platform_Name## -documentation: ug ---- - -# Save and open Spreadsheet data as a Base64 string in ##Platform_Name## Spreadsheet control - -In the Spreadsheet control, there is currently no direct option to save and open data as a `Base64` string. You can achieve this by saving the Spreadsheet data as blob data and then converting that saved blob data to a `Base64` string using `FileReader`. - -> You can get the Spreadsheet data as blob in the [saveComplete](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_SaveComplete) event when you set the `needBlobData` as **true** and `isFullPost` as **false** in the [beforeSave](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_BeforeSave) event. - -The following code example shows how to save and open the spreadsheet data as base64 string. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/base-64-string/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="OpenController.cs" %} -{% include code-snippet/spreadsheet/base-64-string/opencontroller.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/base-64-string/razor %} -{% endhighlight %} -{% highlight c# tabtitle="OpenController.cs" %} -{% include code-snippet/spreadsheet/base-64-string/opencontroller.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} diff --git a/ej2-asp-core-mvc/spreadsheet/how-to/sort-a-range-by-custom-list.md b/ej2-asp-core-mvc/spreadsheet/how-to/sort-a-range-by-custom-list.md deleted file mode 100644 index 8d53e9e773..0000000000 --- a/ej2-asp-core-mvc/spreadsheet/how-to/sort-a-range-by-custom-list.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -layout: post -title: Sort A Range By Custom List in ##Platform_Name## Spreadsheet Component | Syncfusion -description: Learn here all about Sort A Range By Custom List in Syncfusion ##Platform_Name## Spreadsheet component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Sort A Range By Custom List -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Sort a range by custom list - -You can also define the sorting of cell values based on your own customized personal list. In this article, custom list is achieved using `custom sort comparer`. - -In the following demo, the `Trustworthiness` column is sorted based on the custom lists `Perfect`, `Sufficient`, and `Insufficient`. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/custom-sort/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="CustomSortController.cs" %} -{% include code-snippet/spreadsheet/custom-sort/customSortController.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/custom-sort/razor %} -{% endhighlight %} -{% highlight c# tabtitle="CustomSortController.cs" %} -{% include code-snippet/spreadsheet/custom-sort/customSortController.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - - -## See Also - -* [Filtering](./filter) -* [Sorting](https://ej2.syncfusion.com/aspnetcore/documentation/spreadsheet/sort) -* [Hyperlink](./link) \ No newline at end of file diff --git a/ej2-asp-core-mvc/spreadsheet/images/external-reference-dialog-alert .png b/ej2-asp-core-mvc/spreadsheet/images/external-reference-dialog-alert.png similarity index 100% rename from ej2-asp-core-mvc/spreadsheet/images/external-reference-dialog-alert .png rename to ej2-asp-core-mvc/spreadsheet/images/external-reference-dialog-alert.png diff --git a/ej2-asp-core-mvc/spreadsheet/open-save.md b/ej2-asp-core-mvc/spreadsheet/open-save.md index 7e4105327b..91e3afa7e0 100644 --- a/ej2-asp-core-mvc/spreadsheet/open-save.md +++ b/ej2-asp-core-mvc/spreadsheet/open-save.md @@ -140,6 +140,35 @@ You can open excel file into a read-only mode by using the [`openComplete`](http {% endtabs %} {% endif %} +### Import an excel document using file uploader in ##Platform_Name## Spreadsheet control + +If you explore your machine to select and upload an excel document using the file uploader, you will receive the uploaded document as a raw file in the `success` event of the file uploader. In this `success` event, you should pass the received raw file as an argument to the Spreadsheet's `open` method to see the appropriate output. + +The following code example shows how to import an excel document using file uploader in spreadsheet. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/open-uploader/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Opencontroller.cs" %} +{% include code-snippet/spreadsheet/open-uploader/opencontroller.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/open-uploader/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Opencontroller.cs" %} +{% include code-snippet/spreadsheet/open-uploader/opencontroller.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + ### External workbook confirmation dialog When you open an excel file that contains external workbook references, you will see a confirmation dialog. This dialog allows you to either continue with the file opening or cancel the operation. This confirmation dialog will appear only if you set the `AllowExternalWorkbook` property value to **false** during the open request, as shown below. This prevents the spreadsheet from displaying inconsistent data. @@ -156,7 +185,7 @@ public IActionResult Open(IFormCollection openRequest) > This feature is only applicable when importing an Excel file and not when loading JSON data or binding cell data. -![External workbook confirmation dialog](./images/external-reference-dialog-alert%20.png) +![External workbook confirmation dialog](./images/external-reference-dialog-alert.png) ## Supported file formats @@ -363,6 +392,37 @@ Open and save helper functions are shipped in the Syncfusion.EJ2.Spreadsheet pac | ASP.NET MVC4 | Syncfusion.EJ2.MVC4
    Syncfusion.EJ2.Spreadsheet.AspNet.MVC4
    Syncfusion.Compression.Base
    Syncfusion.XlsIO.AspNet.Mvc4
    Syncfusion.ExcelToPdfConverter.AspNet.Mvc4
    | [Syncfusion.EJ2.Spreadsheet.AspNet.MVC4](https://www.nuget.org/packages/Syncfusion.EJ2.Spreadsheet.AspNet.MVC4)
    [Syncfusion.ExcelToPdfConverter.AspNet.Mvc4](https://www.nuget.org/packages/Syncfusion.ExcelToPdfConverter.AspNet.Mvc4) | | ASP.NET MVC5 | Syncfusion.EJ2.MVC5
    Syncfusion.EJ2.Spreadsheet.AspNet.MVC5
    Syncfusion.Compression.Base
    Syncfusion.XlsIO.AspNet.Mvc5
    Syncfusion.ExcelToPdfConverter.AspNet.Mvc5
    | [Syncfusion.EJ2.Spreadsheet.AspNet.MVC5](https://www.nuget.org/packages/Syncfusion.EJ2.Spreadsheet.AspNet.MVC5)
    [Syncfusion.ExcelToPdfConverter.AspNet.Mvc5](https://www.nuget.org/packages/Syncfusion.ExcelToPdfConverter.AspNet.Mvc5) | +## Save and open Spreadsheet data as a Base64 string in ##Platform_Name## Spreadsheet control + +In the Spreadsheet control, there is currently no direct option to save and open data as a `Base64` string. You can achieve this by saving the Spreadsheet data as blob data and then converting that saved blob data to a `Base64` string using `FileReader`. + +> You can get the Spreadsheet data as blob in the [saveComplete](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_SaveComplete) event when you set the `needBlobData` as **true** and `isFullPost` as **false** in the [beforeSave](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_BeforeSave) event. + +The following code example shows how to save and open the spreadsheet data as base64 string. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/base-64-string/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="OpenController.cs" %} +{% include code-snippet/spreadsheet/base-64-string/opencontroller.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/base-64-string/razor %} +{% endhighlight %} +{% highlight c# tabtitle="OpenController.cs" %} +{% include code-snippet/spreadsheet/base-64-string/opencontroller.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + ## See Also * [Filtering](filter) diff --git a/ej2-asp-core-mvc/spreadsheet/sort.md b/ej2-asp-core-mvc/spreadsheet/sort.md index f1d7b0603e..f028efb093 100644 --- a/ej2-asp-core-mvc/spreadsheet/sort.md +++ b/ej2-asp-core-mvc/spreadsheet/sort.md @@ -160,6 +160,35 @@ N> * The `sortComparer` is an optional property of `sortDescriptor`. For custom sort comparer example, refer to the [`Sort a range by custom list`](https://ej2.syncfusion.com/aspnetcore/documentation/spreadsheet/how-to/sort-a-range-by-custom-list) in the `how-to` section. +## Sort a range by custom list + +You can also define the sorting of cell values based on your own customized personal list. In this article, custom list is achieved using `custom sort comparer`. + +In the following demo, the `Trustworthiness` column is sorted based on the custom lists `Perfect`, `Sufficient`, and `Insufficient`. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/custom-sort/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="CustomSortController.cs" %} +{% include code-snippet/spreadsheet/custom-sort/customSortController.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/custom-sort/razor %} +{% endhighlight %} +{% highlight c# tabtitle="CustomSortController.cs" %} +{% include code-snippet/spreadsheet/custom-sort/customSortController.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + ## Known error validations The following errors have been handled for sorting, diff --git a/ej2-asp-core-mvc/spreadsheet/worksheet.md b/ej2-asp-core-mvc/spreadsheet/worksheet.md index 8d04ca80d5..a3ac19f402 100644 --- a/ej2-asp-core-mvc/spreadsheet/worksheet.md +++ b/ej2-asp-core-mvc/spreadsheet/worksheet.md @@ -46,6 +46,34 @@ The following code example shows the insert sheet operation in spreadsheet. {% endtabs %} {% endif %} +### Insert a sheet programmatically and make it the active sheet in ##Platform_Name## Spreadsheet control + +A sheet is a collection of cells organized in the form of rows and columns that allows you to store, format, and manipulate the data. Using `insertSheet` method, you can insert one or more sheets at the desired index. Then, you can make the inserted sheet as active sheet by focusing the start cell of that sheet using the `goTo` method. + +The following code example shows how to insert a sheet programmatically and make it the active sheet. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="InsertSheetController.cs" %} +{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet/insertSheetController.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet/razor %} +{% endhighlight %} +{% highlight c# tabtitle="InsertSheetController.cs" %} +{% include code-snippet/spreadsheet/insert-sheet-change-active-sheet/insertSheetController.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} ## Delete sheet @@ -61,6 +89,34 @@ You can dynamically rename an existing worksheet in the following way, * Right-click on the sheet tab, and then select `Rename` option from the context menu. +## Print in Spreadsheet Control + +You can use the `print` method by importing from ej2-base package. Here, the `Select` event in the dropdown and the `dataBound` event are used to print the single/multiple sheets of data. To print the single/multiple sheets, use the dropdown button and select the `Print` (or) `Print All` option. In the following sample, you can be able to print the single/multiple sheets. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/print/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="PrintController.cs" %} +{% include code-snippet/spreadsheet/print/printController.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/print/razor %} +{% endhighlight %} +{% highlight c# tabtitle="PrintController.cs" %} +{% include code-snippet/spreadsheet/print/printController.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + + ## Headers By default, the row and column headers are visible in worksheets. You can dynamically show or hide worksheet headers by using one of the following ways, diff --git a/ej2-asp-core-toc.html b/ej2-asp-core-toc.html index 8ea568b94a..774953fbef 100644 --- a/ej2-asp-core-toc.html +++ b/ej2-asp-core-toc.html @@ -2469,14 +2469,8 @@
  • How To
  • Mobile Responsiveness
  • diff --git a/ej2-asp-mvc-toc.html b/ej2-asp-mvc-toc.html index 4695f2f86a..a33a2a3092 100644 --- a/ej2-asp-mvc-toc.html +++ b/ej2-asp-mvc-toc.html @@ -2432,14 +2432,8 @@
  • How To
  • Mobile Responsiveness
  • From 995a15fbc5c78d8d56050d9d0c86c8f5901d2ab0 Mon Sep 17 00:00:00 2001 From: DinakarSF4212 <147583019+DinakarSF4212@users.noreply.github.com> Date: Thu, 6 Jun 2024 15:47:23 +0530 Subject: [PATCH 007/145] 889454: Resolved File Path Errors. --- ej2-asp-core-toc.html | 3 --- ej2-asp-mvc-toc.html | 3 --- 2 files changed, 6 deletions(-) diff --git a/ej2-asp-core-toc.html b/ej2-asp-core-toc.html index 774953fbef..c1e2cc6855 100644 --- a/ej2-asp-core-toc.html +++ b/ej2-asp-core-toc.html @@ -2463,9 +2463,6 @@
  • Templates
  • Globalization
  • Use Cases -
  • How To