Last post Feb 10, 2012 11:51 AM by ddelella
Feb 09, 2012 03:35 PM|RobertPichardo|LINK
i have 2 different sqldatasource and i want to show them in one unique chart or autopopulate the chart with these datasource every 3-5 seconds.
someone tell me to try with a "timer" control or something. i find the ajax timer control but i'm not that good using it! any help?
Feb 09, 2012 03:40 PM|ddelella|LINK
A single GridView cannot have more than one source. Your best option is to use a timer and a web service. The web service is responsible for connecting to the database, getting both data sources and combining them into a single DataTable. Typically I
would always combine them on the sql end if possible. The time will call the web service, update the data source for the grid and rebind. Keep in mind the GridView will need to be in an UpdatePanel or it won't refresh properly. Hope that helps!
Feb 09, 2012 04:02 PM|RobertPichardo|LINK
Great, and what about using a chart? can a chart use more than one source? can we autoupdate that source so with one chart we can show 2 or more different data? i am trying to create a dynamic chart from different datasources but showing them in the same
web page! also im using VB and sql WEB Site Project.
Feb 10, 2012 11:51 AM|ddelella|LINK
Charts only support a single DataSource like all WebControls. To use multiple data sources you will need to load the data sources into DataTables and manually insert data into the chart. There is an example of a manual chart creation here: