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

XML binding

1 Answer 69 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 12 May 2011, 04:13 PM

We are using the RAD chart and love it.  We are having a problem displaying XML data in non file format.  If we save the XML file the chart populates correctly, if we try using an object, we get :

 

“There is no or empty series”

Here is our code, any help would be appreciated:

We have to bind RadChart.

…..

Dim resp As HttpWebResponse = DirectCast(req.GetResponse(), HttpWebResponse)

Dim reader As New StreamReader(resp.GetResponseStream())

Dim d As New XmlDocument()

d.LoadXml(reader.ReadToEnd())

reader.Close()

d.Save(Server.MapPath("xmlFiles/Expense.xml"))

RadChart1.DataSource = Server.MapPath("~/xmlFiles/Expense.xml")

RadChart1.DataBind()

 

This is works, but if I try to bind without save xml file (d.Save(Server.MapPath("xmlFiles/Expense.xml"))) :

…..

Dim resp As HttpWebResponse = DirectCast(req.GetResponse(), HttpWebResponse)

Dim reader As New StreamReader(resp.GetResponseStream())

Dim d As New XmlDocument()

d.LoadXml(reader.ReadToEnd())

reader.Close()

RadChart1.DataSource = d.OuterXml

RadChart1.DataBind()

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 17 May 2011, 12:45 PM
Hi Alex,
In this case, you can use an XMLDataSource control. For example:
XmlDataSource1.Data = d.OuterXml
 
RadChart1.DataSourceID = XmlDataSource1.ID
RadChart1.DataBind()

For additional information on binding to XML using an XMLDataSource, please refer to our online documentation - http://www.telerik.com/help/aspnet-ajax/radchart-building-bind-xml-data-source-design-time.html.

Regards,
Tsvetie
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Chart (Obsolete)
Asked by
Alex
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or