File tree Expand file tree Collapse file tree 13 files changed +140
-22
lines changed
ej2-asp-core-mvc/code-snippet/pivot-table Expand file tree Collapse file tree 13 files changed +140
-22
lines changed Original file line number Diff line number Diff line change 1- <ejs-pivotview id="PivotView" height="300">
1+ <ejs-button id="Excel" content="Excel Export" isPrimary="true"></ejs-button>
2+ <ejs-pivotview id="PivotView" height="300" allowExcelExport="true">
23 <e-datasourcesettings dataSource="@ViewBag.DataSource" expandAll="false">
34 <e-formatsettings>
45 <e-field name="Amount" format="C0" maximumSignificantDigits="10" minimumSignificantDigits="1" useGrouping="true"></e-field>
1920 <e-gridSettings columnWidth=120 excelHeaderCellInfo="excelHeaderCell"></e-gridSettings>
2021</ejs-pivotview>
2122<script>
23+ var pivotObj;
24+ document.getElementById('Excel').onclick = function () {
25+ pivotObj = document.getElementById('PivotView').ej2_instances[0];
26+ pivotObj.excelExport();
27+ }
2228 function excelHeaderCell(args) {
2329
2430 }
Original file line number Diff line number Diff line change 1- <ejs-pivotview id="PivotView" height="300">
1+ <ejs-button id="Excel" content="Excel Export" isPrimary="true"></ejs-button>
2+
3+ <ejs-pivotview id="PivotView" height="300" allowExcelExport="true">
24 <e-datasourcesettings dataSource="@ViewBag.DataSource" expandAll="false">
35 <e-formatsettings>
46 <e-field name="Amount" format="C0" maximumSignificantDigits="10" minimumSignificantDigits="1" useGrouping="true"></e-field>
1921 <e-gridSettings columnWidth=120 excelHeaderCellInfo="excelHeaderCell"></e-gridSettings>
2022</ejs-pivotview>
2123<script>
24+ var pivotObj;
25+ document.getElementById('Excel').onclick = function () {
26+ pivotObj = document.getElementById('PivotView').ej2_instances[0];
27+ pivotObj.excelExport();
28+ }
2229 function excelHeaderCell(args) {
2330
2431 }
Original file line number Diff line number Diff line change 1- <ejs-pivotview id="PivotView" height="300">
1+ <ejs-button id="Pdf" content="PDF Export" isPrimary="true"></ejs-button>
2+
3+ <ejs-pivotview id="PivotView" height="300" allowPdfExport="true">
24 <e-datasourcesettings dataSource="@ViewBag.DataSource" expandAll="false">
35 <e-formatsettings>
46 <e-field name="Amount" format="C0" maximumSignificantDigits="10" minimumSignificantDigits="1" useGrouping="true"></e-field>
1921 <e-gridSettings columnWidth=120 pdfHeaderCellInfo="pdfHeaderCell"></e-gridSettings>
2022</ejs-pivotview>
2123<script>
24+ var pivotObj;
25+ document.getElementById('Pdf').onclick = function () {
26+ pivotObj = document.getElementById('PivotView').ej2_instances[0];
27+ pivotObj.excelExport();
28+ }
2229 function pdfHeaderCell(args) {
2330
2431 }
Original file line number Diff line number Diff line change 1- <ejs-pivotview id="PivotView" height="300">
1+ <ejs-pivotview id="PivotView" height="300" allowPdfExport="true" >
22 <e-datasourcesettings dataSource="@ViewBag.DataSource" expandAll="false">
33 <e-formatsettings>
44 <e-field name="Amount" format="C0" maximumSignificantDigits="10" minimumSignificantDigits="1" useGrouping="true"></e-field>
Original file line number Diff line number Diff line change 1616 <e-field name="Amount" caption="Sold Amount"></e-field>
1717 </e-values>
1818 </e-datasourcesettings>
19- <e-hyperlinkSettings showHyperlink="true"></e-hyperlinkSettings>
20- </ejs-pivotview>
19+ <e-hyperlinkSettings showHyperlink="true" cssClass="e-custom-class"></e-hyperlinkSettings>
20+ </ejs-pivotview>
21+
22+ <style>
23+ .e-custom-class {
24+ text-decoration: underline;
25+ color: deepskyblue;
26+ }
27+ .e-custom-class:hover {
28+ color: red;
29+ text-decoration: none;
30+ }
31+ </style>
Original file line number Diff line number Diff line change 1616 <e-field name="Amount" caption="Sold Amount"></e-field>
1717 </e-values>
1818 </e-datasourcesettings>
19- <e-hyperlinkSettings showColumnHeaderHyperlink="true"></e-hyperlinkSettings>
20- </ejs-pivotview>
19+ <e-hyperlinkSettings showColumnHeaderHyperlink="true" cssClass="e-custom-class"></e-hyperlinkSettings>
20+ </ejs-pivotview>
21+
22+ <style>
23+ .e-custom-class {
24+ text-decoration: underline;
25+ color: deepskyblue;
26+ }
27+ .e-custom-class:hover {
28+ color: red;
29+ text-decoration: none;
30+ }
31+ </style>
Original file line number Diff line number Diff line change 2020 <e-field name="Amount" caption="Sold Amount"></e-field>
2121 </e-values>
2222 </e-datasourcesettings>
23- <e-hyperlinkSettings>
23+ <e-hyperlinkSettings cssClass="e-custom-class" >
2424 <e-conditionalsettings>
2525 <e-format measure="Sold" conditions="Between" value1="100" value2="200"></e-format>
2626 </e-conditionalsettings>
2727 </e-hyperLinkSettings>
28- </ejs-pivotview>
28+ </ejs-pivotview>
29+
30+ <style>
31+ .e-custom-class {
32+ text-decoration: underline;
33+ color: deepskyblue;
34+ }
35+ .e-custom-class:hover {
36+ color: red;
37+ text-decoration: none;
38+ }
39+ </style>
Original file line number Diff line number Diff line change 1616 <e-field name="Amount" caption="Sold Amount"></e-field>
1717 </e-values>
1818 </e-datasourcesettings>
19- <e-hyperlinkSettings showRowHeaderHyperlink="true"></e-hyperlinkSettings>
20- </ejs-pivotview>
19+ <e-hyperlinkSettings showRowHeaderHyperlink="true" cssClass="e-custom-class"></e-hyperlinkSettings>
20+ </ejs-pivotview>
21+
22+ <style>
23+ .e-custom-class {
24+ text-decoration: underline;
25+ color: deepskyblue;
26+ }
27+ .e-custom-class:hover {
28+ color: red;
29+ text-decoration: none;
30+ }
31+ </style>
Original file line number Diff line number Diff line change 2020 <e-field name="Amount" caption="Sold Amount"></e-field>
2121 </e-values>
2222 </e-datasourcesettings>
23- <e-hyperlinkSettings headerText= "FY 2015.Q1.Units Sold"></e-hyperlinkSettings>
24- </ejs-pivotview>
23+ <e-hyperlinkSettings headerText= "FY 2015.Q1.Units Sold" cssClass="e-custom-class"></e-hyperlinkSettings>
24+ </ejs-pivotview>
25+
26+ <style>
27+ .e-custom-class {
28+ text-decoration: underline;
29+ color: deepskyblue;
30+ }
31+ .e-custom-class:hover {
32+ color: red;
33+ text-decoration: none;
34+ }
35+ </style>
Original file line number Diff line number Diff line change 2020 <e-field name="Amount" caption="Sold Amount"></e-field>
2121 </e-values>
2222 </e-datasourcesettings>
23- <e-hyperlinkSettings>
23+ <e-hyperlinkSettings cssClass="e-custom-class" >
2424 <e-conditionalsettings>
2525 <e-format label="Germany" conditions="Between" value1="500"></e-format>
2626 </e-conditionalsettings>
2727 </e-hyperLinkSettings>
28- </ejs-pivotview>
28+ </ejs-pivotview>
29+
30+ <style>
31+ .e-custom-class {
32+ text-decoration: underline;
33+ color: deepskyblue;
34+ }
35+ .e-custom-class:hover {
36+ color: red;
37+ text-decoration: none;
38+ }
39+ </style>
You can’t perform that action at this time.
0 commit comments