Need a special offer?Find out if your project fits.
+

How to delete 1st row & 1st column in pivot table

Answered
Manoranjan Gahana asked on September 1, 2016

I have written the following code which is working on click event but i want when the page is completely loaded,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;>
<html>
<head>
<!-- <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
 --><title>Flexmonster Pivot Table & Charts</title>
 <link href="../assets/css/style.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript" src="flexmonster/flexmonster.js"></script>
<style type="text/css"> 
#fm-grid-view .fm-cell {
border: 0px !important;
}
</style>
</head>
<body>
<button id="delete" onclick="javascript: deleteRow();">Delete</button>
<div id="pivotContent">
<!-- IF SOMETHING WENT WRONG HTML5 --> <div style="padding: 10px; margin: 10px 0;"> <font color="#DD0000"><b>Something went wrong!</b></font><br/> <br/> If you see this message, it means you have one of the following problems: <ol> <li>You did not extract files from downloaded zip archive. Unzip and copy all files to your application folder.</li> </ol> If you still see this page, <a href="http://www.flexmonster.com/flash/help/index.html?file=Contents/installation.html">click here</a> for troubleshooting information. </div> <!-- IF SOMETHING WENT WRONG HTML5 -->
</div>
<script type="text/javascript">
//its working
$("#delete").click(function(){
$(".fm-sheet-data-canvas tr:first").remove();
$(".fm-sheet-data-canvas").find("tr").find("td:first").remove();
});
var params = {
filename : "http://localhost:8080/flexdemo/reports/report.xml&#8221",
licenseKey: "Z529-1M1VP2-2M1A-2B3A-1G0E-1738-332G-091E-2U02-1S34-0U",
};
flexmonster.embedPivotComponent("flexmonster/", "pivotContent", "100%", "500",params,true);

//its not working
function deleteRow(){
$(document).ready(function() {
$('.fm-sheet-data-canvas tr:first').remove();
$('.fm-sheet-data-canvas').find("tr").find("td:first").remove();
});
}
</script>
</body>
</html>

i want the screen like in the attachment when the page is loaded completely,

Attachments:
demo.jpg
demo.jpg

3 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster September 1, 2016

Hi Manoranjan,
Thank you for your question. It seems that "showHeaders" report property can solve your problem. It is set with true by default. If you set it false the first row and column will not be shown. Here is an example of how you can do that https://jsfiddle.net/Uaman23/jd6atft8/. Let us know if it helps you.
Best regards,
Dmytro.

Public
Manoranjan Gahana September 2, 2016

Thanks Dmytro.......

Public
Tanya Gryshko Tanya Gryshko Flexmonster December 7, 2016

Hello Manoranjan and all Flexmonster users,
After the release of version 2.3, we would like to provide you with the updated sample: https://jsfiddle.net/flexmonster/m44besj9/.
Regards,
Tanya

Please login or Register to Submit Answer