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

Use HTML TextBox for XML data

1 Answer 201 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Laura
Top achievements
Rank 1
Laura asked on 16 Oct 2012, 03:33 PM
Since Telerik Reporting does not handle XML data very well, I am trying to create a simple solution. I have some XML being returned as part of my data source. I also have a function that takes an XML String and a XPATH query String. I then loop through the nodes returned from the XPATH query and build an HTML table.
  For some reason the HTML TextBox is converting my HTML Table at runtime to a simple DIV element. Is there any way around this?


Thanks very much for your help.

1 Answer, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 19 Oct 2012, 10:33 AM
Hi Wenlei,

The HtmlTextBox is used only for presentation purposes, not for structuring data. Therefore tags such as the table tag are not supported. For the full list of supported tags please check the HtmlTextBox help article.

What you can do is use divs instead of table. However the best solution would be to use the ObjectDataSource. In a similar manner that you create your html table you can create objects and fill them with your xml data. After that this data can be retrieved with the ObjectDataSource and visualized using a table, Crosstab or subreport for example. This will have several benefits, like conditional formatting, filtering, sorting, using report parameters, etc.

Regards,
IvanY
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Laura
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Share this question
or