databinding

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Lightit
Posts: 13
Joined: Tue Mar 31, 2015 6:17 am

databinding

Post by Lightit » Wed Apr 08, 2015 12:13 pm

How is databinding supported?
In other graph control I can set Datasource to a bindinglist and the x y z valuemeber. With a class based on IPointEditList this works in both directions: Moving a Point with mouse in edit mode alters also the data in the list.

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: databinding

Post by ArctionPasi » Wed Apr 08, 2015 3:20 pm

Moving a point with a mouse will need using a SeriesEventMarker. See this example:
Curve node editing with SeriesEventMarkers
Curve node editing with SeriesEventMarkers
Curve node editing.jpg (459.31 KiB) Viewed 8736 times
In marker.PositionChanged event, update the marker's new XY value in the series data array.
LightningChart Support Team, PT

Lightit
Posts: 13
Joined: Tue Mar 31, 2015 6:17 am

Re: databinding

Post by Lightit » Wed Apr 08, 2015 4:31 pm

Thanks. But how work data binding? Then the changes in the data array are sent to a bindinglist or database table.

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: databinding

Post by ArctionPasi » Wed Apr 08, 2015 5:52 pm

Hook up in the marker PositionChanged event, and use code to update your dataset. There's no built-in binding.
LightningChart Support Team, PT

Lightit
Posts: 13
Joined: Tue Mar 31, 2015 6:17 am

Re: databinding

Post by Lightit » Wed Apr 08, 2015 6:07 pm

Ok. Then I also have to hook up the events in the Bindinglist to update the chart if the data are changed in a datagridview.

Post Reply