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

[Solved] How To Serialize Data Within RadGrid To XML Using RadGrid's Server Side API

1 Answer 248 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jgill
Top achievements
Rank 1
jgill asked on 06 Nov 2009, 06:51 AM
Hello,
I have a need to seriaize data from a RadGrid's data into XML for storage into a database field and am having trouble determining how to do this. 

Example: Imagine that you have classes for entities like People, Places, etc. that all have different types and numbers of properties and you want to serialize them to a common XML format that is "original class agnostic" and is basically just a generic representation of a collection in XML format.  Basically I have a scenario where I read data from a set of tables to populate a RadGrid with dynamically generated columns (the columns are dependent on which table the data is loaded from), then the user can add new rows and edit the existing data, then I need to save all the data that is currently in the RadGrid including the order of the rows/items into 1 field of data (e.g. one XML string that is saved to a DB field)

Using the following data as an example:
[First Name]     [Last Name]     [Age]
John                 Smith               34
Jane                 Smith               35

[Address]          [City]          [State]          [Postal Code]
123 Help St.       Chicago      IL                 60652

How could I use the RadGrid's API to serialize both types data (Person and Address) in the same way so the items are generically stored in XML as objects that can be deserialized into RadGrid items/rows and column values again later?

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 06 Nov 2009, 11:54 AM
Hello,

There is not grid API related to data serialization/deserialization - you may need to use DataSet instead!

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
jgill
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or