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

Week View - Limitting the Number of Appointments

5 Answers 51 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Archan
Top achievements
Rank 1
Archan asked on 12 Sep 2008, 11:08 AM
Hi

Is there any way to limit the number of visible appointments in the Weekly View of the Rad Scheduler..

There is way to do it in Monthly View...like  

MonthView-VisibleAppointmentsPerDay

="3"

Is there any way way to do something like this in Week View also.

Thanks in Advance..

Thanks and Regards
Archan

5 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 15 Sep 2008, 12:18 PM
Hello Archan,

RadScheduler does not support this functionality at the moment. However, in the near future (hopefully after Q3) it will be possible to add controls to each Time Slot. So, you could check whether a Time Slot has more than a fixed number of Appointments and in this case hide the rest and add a link to the corresponding Day View as illustrated in the code below.

    protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e) 
    { 
        if (this.RadScheduler1.SelectedView == Telerik.Web.UI.SchedulerViewType.WeekView) 
        { 
            if (e.TimeSlot.Appointments.Count > 2) 
            { 
                for (int appIndex = 2; appIndex < e.TimeSlot.Appointments.Count; appIndex++) 
                { 
                    e.TimeSlot.Appointments[appIndex].Visible = false
                } 
 
                e.TimeSlot.Controls.Add(...); 
            } 
        } 
    } 

All the best,
Simon
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Archan
Top achievements
Rank 1
answered on 17 Sep 2008, 11:22 AM
Hi Simon

Thanks for the reply ..
But the below line giving me error : --


e.TimeSlot.Controls.Add(...); 

That is missing some reference or assembly...
Please let me know how to make it working..

Thanks
Archan
0
Peter
Telerik team
answered on 17 Sep 2008, 01:00 PM
Hello Archan,

Sorry for not being clear enough. The code sample which I sent you is to show what would be possible to do once we implement the needed functionality. Current versions do not have the Controls property for the TimeSlot object.


Simon
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Archan
Top achievements
Rank 1
answered on 17 Sep 2008, 01:58 PM
Hi

ok..got the point..
But for the time being is there any work around to do the same ..

Thanks
Archan 
0
Peter
Telerik team
answered on 17 Sep 2008, 02:00 PM

Sadly, there isn't a workaround.


Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Archan
Top achievements
Rank 1
Answers by
Simon
Telerik team
Archan
Top achievements
Rank 1
Peter
Telerik team
Share this question
or