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

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

1 Answer 135 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Gus
Top achievements
Rank 1
Gus asked on 17 Jun 2011, 05:00 PM
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:http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-display-all-radscheduler-appointments-in-gridview.aspx, 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,
Gus

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 22 Jun 2011, 03:11 PM
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.

Regards,
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.

Tags
Scheduler
Asked by
Gus
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or