Chart does not display data when datasource is reset

2 posts, 0 answers
  1. Jeffrey Monroe
    Jeffrey Monroe avatar
    7 posts
    Member since:
    Feb 2005

    Posted 17 Nov 2011 Link to this post

    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
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 22 Nov 2011 Link to this post

    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.

  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top