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

Export to XML

5 Answers 103 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tal
Top achievements
Rank 1
Tal asked on 18 May 2011, 11:15 AM
Hi, i need to export the gridview data to clean XML format (not the Excel XML type), how can i do it?
if i could get the grid rows and cell it would be the best but i understand that it's not possible with your grid design,
i want to write my custom xml file. your demo does not shows how to do that.

5 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 18 May 2011, 12:36 PM
Hi Tal,

Would you shed some more light on your requirements, you want to export a RadGridView, or you want to export only its ItemsSource? In case the first case is concerned, you may have a look at this demo, and inform us if this solution meets your requirements.

All the best,
Ivan Ivanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tal
Top achievements
Rank 1
answered on 18 May 2011, 12:44 PM
the demo does not help me as it does not show how to create a clean xml file not the ExceL xml format
I'll shed some more lights:

if for example i have a gridview displaying these results :
Name | Age
tal        30
Jason   50

the result xml file i'm interested in is:
<?xml version="1.0" encoding="utf-8"?>
<Report>
    <Row>
        <Name>tal</Name>
        <Age>30</Age>
    </Row>
   <Row>
        <Name>jason</Name>
        <Age>50</Age>
    </Row>
</Report>
0
Accepted
Ivan Ivanov
Telerik team
answered on 18 May 2011, 12:56 PM
Hi Tal,

In fact you are targeting xml serialization of your data, but I fear this feature is out of the support scope of RadGridView. I would advise you to have a look at this article for more extensive information on this problem. 

Regards,
Ivan Ivanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tal
Top achievements
Rank 1
answered on 18 May 2011, 01:03 PM
Thanks for your quick reply,

Actually i know exactly how to do the xml serialization , my problem is how to get the data from the grid
i need the rows and their cells data
0
Vlad
Telerik team
answered on 18 May 2011, 01:04 PM
Hello,

 You can check this demo to know more about this. 

Greetings,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Tal
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Tal
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or