To reproduce use the code below:
DataTable table = new DataTable();
for (int i = 0; i < 20; i++)
{
table.Columns.Add("Left" + i, typeof(int));
table.Columns.Add("Right" + i, typeof(int));
}
for (int i = 0; i < 27; i++)
{
List<object> parameters = new List<object>();
for (int j = 0; j < table.Columns.Count - 2; j++)
{
parameters.Add(100 * i + i);
}
table.Rows.Add(parameters.ToArray());
}
this.radGridView1.DataSource = table;
ColumnGroupsViewDefinition def = new ColumnGroupsViewDefinition();
for (int i = 0, j = 0; i < 20; i++)
{
var group = new GridViewColumnGroup("Group" + 3 + i);
def.ColumnGroups.Add(group);
group.Groups.Add(new GridViewColumnGroup("0"));
group.Groups[0].Rows.Add(new GridViewColumnGroupRow() { MinHeight = 30});
group.Groups[0].Rows[0].ColumnNames.Add(this.radGridView1.Columns[j].Name);
this.radGridView1.Columns[j].Width = 58;
j++;
group.Groups[0].Rows[0].ColumnNames.Add(this.radGridView1.Columns[j].Name);
this.radGridView1.Columns[j].Width = 58;
j++;
}
radGridView1.MasterTemplate.ShowRowHeaderColumn = false;
this.radGridView1.ViewDefinition = def;
// To Export:
GridViewPdfExport pdfExport = new GridViewPdfExport(this.radGridView1);
pdfExport.FitToPageWidth = false;
pdfExport.ExportViewDefinition = true;
pdfExport.ExportVisualSettings = true;
pdfExport.RunExport(@"..\..\pdf", new PdfExportRenderer());