Need to bind radscheduler to RadGrid and get all appointments by date range!

2 posts, 0 answers
  1. Gus
    Gus avatar
    8 posts
    Member since:
    Feb 2009

    Posted 17 Jun 2011 Link to this post

    Hi guys,

    What I need to do is bind the radscheduler data to a radgrid and search by date range.  Once the date range is selected it will only show those dates.  I have tried this with  sqldatasource, but I am not getting all the events.  I looked  at the following article:, works fine.  I now get eveything even all the recurring events.  I have 2 rad datepickers on the page.  One is RadStart the other is Radend.  When i do a date range search (SELECT * FROM [Visit] WHERE (([Start] >= @RadStart) AND ([End] <= @RadEnd))), I still get all the recurring events in my RadGrid. It is not showing me events only for that selected date range.
    Any ideas?

    Thank you,
  2. Plamen
    Plamen avatar
    2988 posts

    Posted 22 Jun 2011 Link to this post

    Hello Gus,

    You may try to add this code to the KB that you were following to get the appointments in range(in this case from now to 20 days ahead):
    using System.Linq;
    var result = RadScheduler1.Appointments.Where(a => (a.Start > DateTime.Now) && (a.End < DateTime.Now.AddDays(20)));
          foreach (Appointment a in result)

    Hope that this helps.

    Plamen Zdravkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top