|
Query |
Response | |
|
I want to fetch the data prepared by user in pivot grid and then want to bind the data with Pivot chart. |
You can load the pivot chart control with pivot grid data using following code example.
Code Example:
| |
|
I have raw datatable which is provided to Pivot Grid but not able to fetch values, rows, columns from pivot grid modified by user. |
You can fetch the axis details modified by the user in pivot grid using following code example.
Code Example:
|
|
<script src="//cdn.syncfusion.com/15.1.0.33/js/web/ej.web.all.min.js"> </script>
<link rel="stylesheet" rel='nofollow' href="//cdn.syncfusion.com/15.1.0.33/js/web/flat-azure/ej.web.all.min.css" /> |
|
$("#PivotGrid").ejPivotGrid({
dataSource: {
data: pivot_dataset,
rows: [{ fieldName: "Country", fieldCaption: "Country" }, { fieldName: "State", fieldCaption: "State" }],
columns: [{ fieldName: "Product", fieldCaption: "Product" }],
values: [{ fieldName: "Amount", fieldCaption: "Amount" }, { fieldName: "Quantity", fieldCaption: "Quantity" }],
filters: [{ fieldName: "Date", fieldCaption: "Date" }]
},
pivotTableFieldListID: "PivotSchemaDesigner",
renderSuccess: "renderSuccess",
});
function renderSuccess(args) {
var schemaObj = $("#PivotSchemaDesigner").data("ejPivotSchemaDesigner");
if (schemaObj)
schemaObj.refreshControl();
} |
|
<body>
<div id="Spreadsheet"></div>
</body>
<script>
$(function () {
$("#Spreadsheet").ejSpreadsheet({
ribbonSettings: {
applicationTab: {
type: ej.Ribbon.ApplicationTabType.Menu,
menuSettings: {
isAppend: true
}
}
},
exportSettings:
{
excelUrl: "http://js.syncfusion.com/demos/ejServices/api/Spreadsheet/ExcelExport",
csvUrl: "http://js.syncfusion.com/demos/ejServices/api/Spreadsheet/CsvExport",
pdfUrl: "http://js.syncfusion.com/demos/ejServices/api/Spreadsheet/PdfExport"
},
loadComplete: "loadComplete",
});
});
function loadComplete(args) {
var xlObj = $("#Spreadsheet").data("ejSpreadsheet");
xlObj.XLRibbon.removeMenuItem(1);
xlObj.XLRibbon.removeMenuItem(1);
}
</script>
|
|
<body>
<div id="Spreadsheet"></div>
</body>
<script>
$(function () {
$("#Spreadsheet").ejSpreadsheet({
ribbonSettings: {
applicationTab: {
type: ej.Ribbon.ApplicationTabType.Menu,
menuSettings: {
isAppend: true
}
}
}
loadComplete: "loadComplete",
});
});
function loadComplete(args) {
var xlObj = $("#Spreadsheet").data("ejSpreadsheet");
xlObj.XLRibbon.removeMenuItem(1);
xlObj.XLRibbon.removeMenuItem(1);
var totalTabs = 6;
for (var i = 0; i < totalTabs; i++) {
xlObj.XLRibbon.removeTab(1, true);
}
$("#Spreadsheet" + "_Ribbon").data("ejRibbon").collapse();
}
</script>
|