This is a migrated thread and some comments may be shown as answers.

Chart does not display data when datasource is reset

1 Answer 109 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeffrey Monroe
Top achievements
Rank 2
Jeffrey Monroe asked on 17 Nov 2011, 04:55 PM
I have the following code that gets called on form load and when a button is clicked:

rcSummary.Series.Clear()
rcSummary.RemoveAllSeries()
rcSummary.Clear()
rcSummary.DataSource = PersistenceHelper.GetResponseContentDailySummary(_dbContext, rdtStartDate.Value.Date)

The chart displays with the proper data when the form loads. If the button is clicked on the form, the chart displays "There is no or empty series".

I have verified the correct data is returned by the GetResponseContentDailySummary function.

Any help would be much appreciated,
-jm

1 Answer, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 22 Nov 2011, 05:14 PM
Hello Jeffrey,

Please, add a call to the DataBind method of RadChart after setting its DataSource property:
rcSummary.DataSource = PersistenceHelper.GetResponseContentDailySummary(_dbContext, rdtStartDate.Value.Date)
rcSummary.DataBind()


Kind regards,
Giuseppe
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Tags
Chart (obsolete as of Q1 2013)
Asked by
Jeffrey Monroe
Top achievements
Rank 2
Answers by
Giuseppe
Telerik team
Share this question
or