Hello,
I just started using the Infragistics tool, and I have to create an UltraChart and information from a SQL DB has to be displayed on the chart. Now I'm not sure how to bind the data from the Sql table to the chart and then display that chart on a .aspx webpage when a link is clicked.
I am using Microsoft Visual Studio 2008 and NetAdvantage for .Net Vol1 CLR 3.5 with Microsoft Sql Server.
I have used this code in the .vb file......What am I missing? The chart is on the .aspx page in a form, tables are used.
UltraChart1.DataSourceID = Infragistics.UltraChart.Data.DemoTable.Table
UltraChart1.DataBind()
End Sub
In .aspx file this is code generated by the chart, is something missing here?
<igchart:UltraChart ID="UltraChart1" runat="server" BackgroundImageFileName=""
A quick response will be greatly appreciated.
Thanks!
Once you have created a dataset and filled it with sql data, do the following:UltraChart1.Data.DataSource = myDataSet.Tables("myTable")UltraChart1.Data.DataBind()
Here's what I've done, but I am getting an error "Column Chart Error: You must have atleast one row and one numeric column."
Where am I going wrong...is this a DB connectivity issue or something else?
Me.UltraChart1.Data.DataSource = GetColumnData()
Dim conn As String = "server=xxx;Database=xxx;"
Dim comm As New SqlCommand("Select * FROM xxx", myconn)
Dim mydataset As New DataSet()
myconn.Open()
dr = comm.ExecuteReader()
dr.Close()
myconn.Close()
da.Fill(mydataset)
End Function
Your function GetColumnData returns a table 'mydata' that had no operations performed on it. Try returning a table from 'mydataset' since that's what you're filling.
Thank You...its working now.