Reputation:
How do i make make my chart update or refresh in my windows form. My chart is connected to access. In my form i have a series of text-boxes and a Datagridview with an update button. When i enter all the data in the text-box and click the update button my Datagridview updates, but my chart does not.
I have to go to another form and come back to the form with the chart to see the update. How do see the update when i click on the update button.
After looking for the answers online I have tried:
Chart1.Series.Clear() - This just clears my chart
Chart1.Update() - This doesn't seem do do anything.
I basically followed this YouTube tutorial but it doesn't show how to update https://www.youtube.com/watch?v=DJ486tfZnuo
Upvotes: 2
Views: 2063
Reputation: 508
You need to call Chart.DataBind()
for changes to the DataSource to affect the chart.
Upvotes: 1