Export to ExcelML add custom attributes to nodes

5 posts, 1 answers
  1. Rob
    Rob avatar
    10 posts
    Member since:
    Nov 2012

    Posted 11 Nov 2012 Link to this post

    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>

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 12 Nov 2012 Link to this post

    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.

  3. Rob
    Rob avatar
    10 posts
    Member since:
    Nov 2012

    Posted 12 Nov 2012 Link to this post

    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
  4. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 12 Nov 2012 Link to this post

    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.

  5. Rob
    Rob avatar
    10 posts
    Member since:
    Nov 2012

    Posted 12 Nov 2012 Link to this post

    Thank you the second link was very helpful.
Back to Top