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

Create Grid structure from an XML

5 Answers 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marietta
Top achievements
Rank 1
Marietta asked on 12 Feb 2009, 12:42 PM

Hi,

I have a question in this topic. I reviewed this topic in the help (

http://www.telerik.com/help/aspnet-ajax/grdpopulatinggridfromxml.html) and also I checked the example from the demo and I have this question: is there a way to load the structure of the grid (columns and format only, no data) from and XML into a grid that has been place in the page in the design time? I do not want to create the grid dynamically. If so, can somebody provide me an example?

 

Thanks

5 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 16 Feb 2009, 02:58 PM
Hi Marietta,

For this purpose you can use XmlDataSource control and preconfigured grid on the page. Review the examples below for more information:

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/xmldatasource/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/grdpopulationfromxmldatasource%20control.html

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Marietta
Top achievements
Rank 1
answered on 20 Feb 2009, 07:55 PM

Thanks Sebastian,

In our solution we need to upload from an XML JUST the columns of the grid and the format, we are NOTgoing to upload the data from the XML. Once we have the structure of the grid we will bring the data from a database (using SP), and we also need to do insert, update and delete.

Are these examples the best way to do this using the telerik grid?

Basically we have the columns in a separate XML file and the data is in a SQL database. Users setup which columns they want to see in the tables.
Thanks.

0
Sebastian
Telerik team
answered on 24 Feb 2009, 10:30 AM
Hi Marietta,

Thank you for the clarification. For this purpose you can utilize the Page.ParseControl method of the ASP.NET AJAX framework and use the approach presented on the following online demo of RadGrid for ASP.NET AJAX:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/gridfromxml/defaultcs.aspx

Review the information/code snippets from the sample for more details.

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Marietta
Top achievements
Rank 1
answered on 24 Feb 2009, 12:57 PM

Thanks for your answer, but I have already reviewed this example, in fact this was my original question: is there a way using telerik grid to upload just the columns from an XML (NO DATA) to a static grid (I do not want to create the grid in runtime).

I just need somebody from Telerik to confirm this.

Thanks.

0
Sebastian
Telerik team
answered on 24 Feb 2009, 02:47 PM
Hi Marietta,

The options to load the grid structure from XML are two:
  1. Presented in the example you linked (sorry for the duplicate pointer)

    or
     
  2. Via a ASP.NET Theme where you can specify the basic structure of the control and extend it on different pages (if applicable).
Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Marietta
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Marietta
Top achievements
Rank 1
Share this question
or