I have adapted it to work with my database which it does and well, however once i have generated the graph once, I want it to keep updating the dataset as more data becomes available in the database, Creating the graph again only seems to plot the previously available points, the only way this application will plot new points it by restarting the application can any one point me in the right direction?
Regards
Dan Walmsley
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
// dspl is your DataSourcePointList
BindingSource bSource = dspl.BindingSource as BindingSource;
bSource.ResetBindings( false );
Invalidate();
In looking at the code, the DataSource field is defined internally as BindingSource, but the external property is a regular "object". I don't recall exactly why I did it this way -- I need to revisit this because it should probably be an actual BindingSource so the properties are visible to users. If anyone can offer any experience here, it would be much appreciated.
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Iv used the example shown at:
http://zedgraph.org/wiki/index.php?title=Use_the_DataSourcePointList_to_access_database_data
I have adapted it to work with my database which it does and well, however once i have generated the graph once, I want it to keep updating the dataset as more data becomes available in the database, Creating the graph again only seems to plot the previously available points, the only way this application will plot new points it by restarting the application can any one point me in the right direction?
Regards
Dan Walmsley
Dan,
See if this works:
// dspl is your DataSourcePointList
BindingSource bSource = dspl.BindingSource as BindingSource;
bSource.ResetBindings( false );
Invalidate();
In looking at the code, the DataSource field is defined internally as BindingSource, but the external property is a regular "object". I don't recall exactly why I did it this way -- I need to revisit this because it should probably be an actual BindingSource so the properties are visible to users. If anyone can offer any experience here, it would be much appreciated.
John