4 Answers, 1 is accepted
0
Hello William,
I'm afraid that this is not possible out-of-the-box. I'm not saying that it is not achievable at all, but a lot of custom code would be involved. Simplified step-by-step instructions below:
- disable the paging in order to show all groups
- traverse the items and build a dictionary of indexes (group;index) pointing to the items belonging the given groups
- use the Export Infrastructure to build the output file by traversing the generated dictionary from the step above
Best regards,
Daniel
the Telerik team
I'm afraid that this is not possible out-of-the-box. I'm not saying that it is not achievable at all, but a lot of custom code would be involved. Simplified step-by-step instructions below:
- disable the paging in order to show all groups
- traverse the items and build a dictionary of indexes (group;index) pointing to the items belonging the given groups
- use the Export Infrastructure to build the output file by traversing the generated dictionary from the step above
Best regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

William
Top achievements
Rank 1
answered on 04 Feb 2013, 03:40 PM
Thanks, Daniel . I will try it.
0

Najah
Top achievements
Rank 1
answered on 26 Feb 2013, 03:27 PM
Dear William,
Were you able to achieve the desired functionality? I have the same requirement, grateful if you could share your experience and/or code?
Many thanks,
Sana
Were you able to achieve the desired functionality? I have the same requirement, grateful if you could share your experience and/or code?
Many thanks,
Sana
0

William
Top achievements
Rank 1
answered on 26 Feb 2013, 03:58 PM
Hi Sana,
Here is what did, hopfully it will help,
protected void RadGrid1_GridExporting(object source, GridExportingArgs e)
WorksheetElement workSheet;
foreach () //loop groups pulled from database
{
}
Here is what did, hopfully it will help,
protected void RadGrid1_GridExporting(object source, GridExportingArgs e)
{
StringBuilder sb = new StringBuilder();WorksheetElement workSheet;
foreach () //loop groups pulled from database
{
workSheet = new WorksheetElement(sectionName); //create new worksheet
workSheet.Table = CreateTable (groupDetails);
workSheet.Render(sb);
//generate xmlss code
}
e.ExportOutput = e.ExportOutput.Replace("</Styles>", "</Styles>" + sb.ToString()); //add the rendered worksheet to the output
}
{
TableElement ssTable = new TableElement();
RowElement ssRow;
CellElement ssCell;
ColumnElement ssColumn;
foreach (DataRow row in aspTable.Rows)
{
ssRow = new RowElement();
ssCell = new CellElement();
ssCell.Data.DataItem = (int)row["fields"];
ssRow.Cells.Add(ssCell);
........
ssTable.Rows.Add(ssRow);
}
}