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

Export to ExcelML add custom attributes to nodes

4 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 12 Nov 2012, 04:32 AM
Hi there,

Just wondering if it's possible during the RadGridView.ElementExporting of RadGridView.ElementedExported events to get a handle of the current cell xml and manipulate it to add some attributes? e.g.

Change this:
<Row>
    <Cell><Data ss:Type="String">Bicarbonate</Data></Cell>
</Row>
to this:

<Row>
    <Cell ss:StyleID="GroupHeading"><Data ss:Type="String">MyValue</Data></Cell>
</Row>

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 12 Nov 2012, 08:07 AM
Hello,

Unfortunately there is not an option to add attributes to the generated node (i.e. Cell) in those events. You could change the Value to be exported in the ElementExporting event or add an additional nodes when the ElementExported event is raised.

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Rob
Top achievements
Rank 1
answered on 12 Nov 2012, 08:52 AM
Hi Didie,

Thanks for the reply, could you please point me in the direction of an example that adding additional info into the cell, I can wrapper things with additional nodes and then post-process them once they're XML. I've tried using the sample code on the telerik page but it didn't seem to have the desired effect when exporting to Excel ML.

Cheers
Rob
0
Accepted
Dimitrina
Telerik team
answered on 12 Nov 2012, 10:35 AM
Hi Rob,

You could check this online demo together with this and this help articles showing how you could change the default export.

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Rob
Top achievements
Rank 1
answered on 12 Nov 2012, 10:16 PM
Thank you the second link was very helpful.
Tags
GridView
Asked by
Rob
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Rob
Top achievements
Rank 1
Share this question
or