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

get_appointments () does not return all

3 Answers 28 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rudá Cunha
Top achievements
Rank 2
Rudá Cunha asked on 10 Nov 2010, 02:07 PM
I'm using the method get_appointments () but it does not bring all the records that was returned by the query. So I figured it creates only those that appear in the scheduler.

How do I create it all Appointment?

3 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 16 Nov 2010, 11:15 AM
Hello Rudá Cunha,

Please accept my apologies for the late reply.

Please note that get_appointments() function returns all appointments in the current view. That's why the count of the appointments returned by this function can vary for different views. 

Could you please explain more on why you need to get all appointments of the scheduler so we can help you?

Regards,
Veronica Milcheva
the Telerik team
Browse the vast support resources we have to jumpstart 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.
0
Rudá Cunha
Top achievements
Rank 2
answered on 16 Nov 2010, 04:55 PM
I have a grid that lists some appointments and when the person clicks on an item, you have to edit from the scheduler, only when it is another date that is not on display (but is returned via the query to the scheduler).

With that I have the problem listed above.
0
Accepted
Veronica
Telerik team
answered on 22 Nov 2010, 03:31 PM
Hi Rudá Cunha,

Please accept my apologies for the late reply.

You can subscribe to the OnSelectedIndexChanged event of the RadGrid and get the Start and End dates of the selected row. After that you can check whether the selected row is with start lower than VisibleRangeStart or greater than VisibleRangeEnd properties form the RadScheduler. If there is such appointment you can call ShowEditFormAt method to open the edit form.

Here's a sample code:

if ((selectedStartDate < RadScheduler1.VisibleRangeStart)||(selectedStartDate > RadScheduler1.VisibleRangeEnd))
            {
                IList<Appointment> apps = RadScheduler1.Appointments.GetAppointmentsEnclosingRange(selectedStartDate, selectedEndDate);
                if (apps.Count != 0)
                {
                    RadScheduler1.ShowAdvancedEditForm(apps[0]);
                }
            }

Please let me know if this was helpful.

Best wishes,
Veronica Milcheva
the Telerik team
Browse the vast support resources we have to jumpstart 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
Rudá Cunha
Top achievements
Rank 2
Answers by
Veronica
Telerik team
Rudá Cunha
Top achievements
Rank 2
Share this question
or