|117490||Oct 30,2014 04:22 AM UTC||Nov 3,2014 12:43 PM UTC||WinForms||3|
Thank you for your interest in Syncfusion products.
If you want to delete the row from Pivotgrid, you can use HideRows property. Please make use of below code,
this.pivotGridControl1.TableModel.HideRows[RowIndex] = true; // The row which you want to delete
Please let me know if I misunderstood your query.
Thank you for your update.
If you want to export the PivotGrid without hidden rows, you need to export the TableModel of the PivotGrid. Because it will export the current structure of the Pivotgrid.
Please refer the below code:
private void buttonAdv2_Click(object sender, EventArgs e)
SaveFileDialog savedialog = new SaveFileDialog();
savedialog.AddExtension = true;
savedialog.FileName = "Sample";
savedialog.DefaultExt = "xlsx";
savedialog.Filter = "Excel file (.xlsx)|*.xlsx";
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2010;
IWorkbook chartBook = ExcelUtils.CreateWorkbook(1);
chartBook.Version = ExcelVersion.Excel2010;
IWorksheet sheet = chartBook.Worksheets;
Syncfusion.GridExcelConverter.GridExcelConverterControl grid = new Syncfusion.GridExcelConverter.GridExcelConverterControl();
grid.QueryImportExportCellInfo += new Syncfusion.GridExcelConverter.GridImportExportCellInfoEventHandler(grid_QueryImportExportCellInfo);
grid.GridToExcel(this.pivotGridControl1.TableModel, sheet, Syncfusion.GridExcelConverter.ConverterOptions.Default);
In the sample you can also export pivot grid without SubTotal row. Please refer the attached sample.
Please let me know if you have further concerns.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.