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
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.
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.
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.
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.
The options to load the grid structure from XML are two:
- Presented in the example you linked (sorry for the duplicate pointer)
or
- Via a ASP.NET Theme where you can specify the basic structure of the control and extend it on different pages (if applicable).
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.