This is a migrated thread and some comments may be shown as answers.

Excel Group Column Alignment with RadGrid ExportToExcel

3 Answers 191 Views
Grid
This is a migrated thread and some comments may be shown as answers.
rob
Top achievements
Rank 1
rob asked on 13 May 2011, 04:39 PM
Per attached image, the grouped column headers should be moved 1 cell left each, so that they don't overlap with the grouped data (product in col D). I've tried to rectify this and seen some examples of kinda how to achieve this. However why is the default behaviour as shown. My users want to be able to sort etc by the group headers and the one that overlaps with the data can't be sorted etc. It's almost as if this is a bug in the control. I can't think of any good reason why the last group header would be aligned with the first data column when exporting to excel.

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 19 May 2011, 03:11 PM
Hello Rob,

The reason is that Microsoft Excel alone decides how to distribute and align the HTML content in the spreadsheet.
Please examine the attached screenshot.

Regards,
Daniel
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
rob
Top achievements
Rank 1
answered on 19 May 2011, 03:54 PM
Yes, I understand why Microsoft Excel behaves the way it does. I'm not disputing those mechanics. My point is your control displays and exports grouped data in a way that doesn't help users sort the data, because your group header column overlaps with the first column.
It isn't a problem when you're just viewing HTML, because you can't sort by a grouped column by default, however when the data is exported to excel the problem becomes apparent because there is no separation of the grouped by column and the first column of data.
What I'm asking (on behalf of excel users) is can you change the default behavior of RadGrid grouping to include a the grouped header 1 cell to the left of the data. I think that's a perfectly reasonable expectation that my users have conveyed to me. As I said, it can be done but in code, but it seems a bit tricky. Perhaps you can provide an example of how to modify the group column alignment of the exported data, in the interim, until you can improve the default behavior of RadGrid grouping.

Rob
0
Daniel
Telerik team
answered on 25 May 2011, 01:09 PM
Hello Rob,

I passed your suggestion to our developers.
Also I created a simple demo that shows how to sidestep the unwanted behavior. I hope it will be a good starting point for you.

Kind regards,
Daniel
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
rob
Top achievements
Rank 1
Answers by
Daniel
Telerik team
rob
Top achievements
Rank 1
Share this question
or