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

export to Excel/modify column headers

3 Answers 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Albert Shenker asked on 18 Feb 2013, 06:37 PM
I have a grid which currently uses ExcelML for exporting. I make changes to some of the column header texts in the grid's ItemCreated event. I also include some html break line code in some grid column headers (in the grid declaration) so that these headers will display on two lines.

1) I notice that my changes made in the grid Itemcreated even don't get exported.

2) I would also like to scrub the column headers and replace the <br/> tagas I have with a space or some other character that won't look bad in Excel.

Is it possible to do either of these things using ExcelML, or is there somee other export option that would make these possible?

3 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 21 Feb 2013, 11:17 AM
Hello Albert,

Thank you for contacting us.

I suggest you to check out the following help topic which elaborates more on how to styling the exported file.

Please let me know if I could provide you any further assistance.

All the best,
Kostadin
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
Albert Shenker
Top achievements
Rank 1
Veteran
answered on 21 Feb 2013, 01:39 PM
I don't believe my post has anything to do with export styling, so that help topic isn't useful. Should I submit a support ticket?
0
Kostadin
Telerik team
answered on 26 Feb 2013, 12:56 PM
Hi Albert,

I already answered your support ticket and I will paste my answer here as well if somebody else have similar requirement.
Basically you have to create a custom style and add an attribute ss:WrapText. This style have to be applied to all cells which you would like to have a multi-line text. Then you have to hook OnGridExporting event handler and replace the <br/> tags with &#10; which represent the new line in ExcelML. I prepared a small sample and attached it to this forum post.

Kind regards,
Kostadin
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.
Tags
Grid
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Answers by
Kostadin
Telerik team
Albert Shenker
Top achievements
Rank 1
Veteran
Share this question
or