Webchart data source binding
Webchart data source binding
Using Visual Studio .NET 2005, how do I connect a data source to the webchart ? I can drag the webchart to the form and drag a SQLDataSource but cannot find away of binding together ie get access to datasource through Chart Editor/Series/Data Source/Database. I can do this easy enough as a Windows app but not as a web app.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi jamesl,
There's no design-time support for databases in WebForms. It doesn't make much sense sending a dataset to a browser. I recommend you to read this thread on how to achieve what you request.
Thanks in advance!
There's no design-time support for databases in WebForms. It doesn't make much sense sending a dataset to a browser. I recommend you to read this thread on how to achieve what you request.
Thanks in advance!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis, thanks for the reply.
I have read this thread several times now and still no clearer on finding a example on how to bind a SQL database against a chart against a webform.
Firstly, the examples that you point out are aimed towards Visual 2003 (not 2005) / Windows Forms (not webforms) and microsoft access databases (not sql server).
The Bindingsource steps only work for windows forms not webforms as we dont appear to have a 'Data' tab available!
Also, where do we gain access to the 'debug' verion appears to open up this functionality so that it is available for web forms?
You mention 'If necessary, I can also try to arrange a WebForm example in VS2005 using BindingSource for you.
' would this be more appropriate?
Any help appreciated.
James
I have read this thread several times now and still no clearer on finding a example on how to bind a SQL database against a chart against a webform.
Firstly, the examples that you point out are aimed towards Visual 2003 (not 2005) / Windows Forms (not webforms) and microsoft access databases (not sql server).
The Bindingsource steps only work for windows forms not webforms as we dont appear to have a 'Data' tab available!
Also, where do we gain access to the 'debug' verion appears to open up this functionality so that it is available for web forms?
You mention 'If necessary, I can also try to arrange a WebForm example in VS2005 using BindingSource for you.
' would this be more appropriate?
Any help appreciated.
James
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi James,
Have you tried using the example pw posted in that thread?
Thanks in advance!
Have you tried using the example pw posted in that thread?
Thanks in advance!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi James,
I'm referring to the thread I already pointed you:
http://www.teechart.net/support/viewtopic.php?t=3416
If you read the whole thread, you'll see that on 6th February 2006 pw posted an example on how to achieve something similar to what you request.
Thanks in advance.
I'm referring to the thread I already pointed you:
http://www.teechart.net/support/viewtopic.php?t=3416
If you read the whole thread, you'll see that on 6th February 2006 pw posted an example on how to achieve something similar to what you request.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis, thanks for the reply we in fact did see the post but were confused by what the manual was telling us:-
'And Internet ! TeeChart Pro .Net is fully compatible with ASP.NET, being able to be placed on an ASP.NET WebForm and edited at design time in a completely WYSIWYG fashion'
Please can I confirm our current understanding, in that you cannot bind data at 'design time' and therefore cannot see what it is you are meant to be designing?
That all of the chart functionality which is easily accessible within a windows form by editing the control now needs to be dealt from within code?
However, we will pursue the posting that was made on the 6th Feb!
Many thanks!
'And Internet ! TeeChart Pro .Net is fully compatible with ASP.NET, being able to be placed on an ASP.NET WebForm and edited at design time in a completely WYSIWYG fashion'
Please can I confirm our current understanding, in that you cannot bind data at 'design time' and therefore cannot see what it is you are meant to be designing?
That all of the chart functionality which is easily accessible within a windows form by editing the control now needs to be dealt from within code?
However, we will pursue the posting that was made on the 6th Feb!
Many thanks!
Hello,
Confirmation:
WebChart does not recognise for the Chart Editor, the SQLDataAdapter at designtime.
Current connection code would take the following form:
Eg.
We'll put it on our prioirity list to see whether we can offer in the near future the SQLDataAdapter to the Editorlist of visible datasets.
Regards,
Marc Meumann
Confirmation:
WebChart does not recognise for the Chart Editor, the SQLDataAdapter at designtime.
Current connection code would take the following form:
Eg.
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
System.Web.UI.DataSourceSelectArguments dArgs = new DataSourceSelectArguments();
System.Data.DataView dView =new DataView();
//assumes SqlDataSource1 setup correctly to return data
dView = (System.Data.DataView)(SqlDataSource1.Select(dArgs));
WebChart1.Chart.Axes.Bottom.Labels.Angle = 90;
WebChart1.Chart[0].YValues.DataMember = dView.Table.Columns[1].ToString(); //yvalues
WebChart1.Chart[0].XValues.DataMember = dView.Table.Columns[2].ToString(); //xvalues
WebChart1.Chart[0].LabelMember = dView.Table.Columns[0].ToString(); //labels
WebChart1.Chart[0].DataSource = dView;
}
Regards,
Marc Meumann
Steema Support