If I understand you correctly you would like to export to pdf only summary rows for all group levels (which means without exporting any data rows). I would like to note that GridViewPdfExport offers HiddenRowOption property that controls whether and how the hidden rows should be exported. To achieve your goal I can suggest you to go through the Radgridview.Rows collection and make the data rows not visible before exporting. Then set the HiddenRowOption to DoNotExport. Please refer to the following code snippet:
private void radButton1_Click(object sender, EventArgs e)
Telerik.WinControls.Export.GridViewPdfExport pdfExporter = new Telerik.WinControls.Export.GridViewPdfExport(this.radGridView1);
pdfExporter.FileExtension = "pdf";
pdfExporter.SummariesExportOption = Telerik.WinControls.UI.Export.SummariesOption.ExportAll;
string fileName = @"..\..\export" + DateTime.Now.ToLongTimeString().Replace(":", "_") + ".pdf";
foreach (var row in this.radGridView1.Rows)
if (row is GridViewDataRowInfo)
row.IsVisible = false;
pdfExporter.HiddenRowOption = Telerik.WinControls.UI.Export.HiddenOption.DoNotExport;
pdfExporter.RunExport(fileName, new Telerik.WinControls.Export.PdfExportRenderer());
Thus, following my project example from the previous post, if you have the RadGridView grouped by "Item Name" and "Quantity", the result after export to pdf should look like the following picture (only summary rows for each group level are shown):
I attached my sample project to this thread for your reference. Could you please refer to it and see how it works for you?
I hope this helps. If you need further assistance I will be glad to help.
Progress is here for your business, like always. Read more
about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.