Menu

Datasource point list example how to update?

Help
2007-11-02
2012-09-19
  • Dan Walmsley

    Dan Walmsley - 2007-11-02

    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

     
    • John Champion

      John Champion - 2007-11-02

      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

       

Log in to post a comment.

MongoDB Logo MongoDB