开发者

Form dataset update

I am using devexpress component "XtraCharts" to be able to prepare a graphical report. I designed a dataset and attached it to the chart. The values from the database appear in the report. There is no problem up to here.

But in my application I read data from a sensor so values come to db consecutively and I need to refresh this dataset every 5 seconds.

How can I do this in a C# win开发者_运维知识库forms application?


You could use a timer control - here is an example tutorial.


Add a Timer to your form, set its interval to 5000ms and on timer Tick event update your dataset.


You probably want to look at the Timer class. You can set the interval you wish the timer to "Tick" at and when the timer ticks update your chart.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜