Skip to content

Commit 59eaeb8

Browse files
928535: To update code snippets for Core Pivot Table UG documentation - updating samples
1 parent 510df28 commit 59eaeb8

File tree

13 files changed

+140
-22
lines changed

13 files changed

+140
-22
lines changed

ej2-asp-core-mvc/code-snippet/pivot-table/grid-customization/excel-headercell/tagHelper

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
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>
@@ -19,6 +20,11 @@
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
}

ej2-asp-core-mvc/code-snippet/pivot-table/grid-customization/excel-querycell/tagHelper

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
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>
@@ -19,6 +21,11 @@
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
}

ej2-asp-core-mvc/code-snippet/pivot-table/grid-customization/pdf-headercell/tagHelper

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
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>
@@ -19,6 +21,11 @@
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
}

ej2-asp-core-mvc/code-snippet/pivot-table/grid-customization/pdf-querycell/tagHelper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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>

ej2-asp-core-mvc/code-snippet/pivot-table/hyper-link/all-cells/tagHelper

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,16 @@
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>

ej2-asp-core-mvc/code-snippet/pivot-table/hyper-link/column-header/tagHelper

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,16 @@
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>

ej2-asp-core-mvc/code-snippet/pivot-table/hyper-link/conditions/tagHelper

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,20 @@
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>

ej2-asp-core-mvc/code-snippet/pivot-table/hyper-link/event/tagHelper

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,16 @@
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>

ej2-asp-core-mvc/code-snippet/pivot-table/hyper-link/headers/tagHelper

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,16 @@
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>

ej2-asp-core-mvc/code-snippet/pivot-table/hyper-link/label-conditions/tagHelper

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,20 @@
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>

0 commit comments

Comments
 (0)