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

Creating Radscheduler Object at Runtime

5 Answers 86 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Cipher
Top achievements
Rank 1
Cipher asked on 28 Oct 2010, 01:05 PM
Hello,

We are currently trialing RadScheduler for a project which involves printing out several room booking sheets for various locations throughout an educational institution.  Rooms are grouped into Campuses. We need to be able to print out all the booking for the rooms in a certain campus for a specified week in a grid format. These printouts are then posted outside the room.

We have managed to use RadScheduler to successfully print out the room bookings for a single room in a campus for a specified week. However we can't seem to get it to printout multiple rooms at the same time. We figured that if we could create an instance of RadScheduler during runtime, we could create a datasource and bind the instance of radscheduler to it. We could loop through a counter to create as many instances of RadScheduler as required to print out room bookings for all the rooms in the campus.

Is there a way to achieve this?


Regards


Ciph

5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 03 Nov 2010, 02:56 PM
Hello Cipher,

Yes, this is actually the approach we would recommend and luckily there is a kb article which you can use as reference - http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-display-all-radscheduler-appointments-in-gridview.aspx.


Greetings,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Cipher
Top achievements
Rank 1
answered on 30 Nov 2010, 03:03 PM
Hello Peter,


The kb article you pointed to, while useful, doesn't really solve the problem we have.

Attached Screenshot shows the different rooms we have and the timetable grid we generate. Selecting the room would generate the timetable grid for the room selected. However as part of our reporting process we need to printout the room schedule for ALL the rooms in a particular campus. As such we are trying to generate multiple radschedulers at runtime and then bind them to a different datasource. This way all the radschedulers will appear on the same page which can then be printed off.

Is there a way to create multiple radschedulers at runtime?


Regards

Ciph
0
Peter
Telerik team
answered on 06 Dec 2010, 10:43 AM
Hello Cipher,

Actually, you don't need a RadScheduler instance to parse the recurrence rule. You can loop through all records in your query result and replace 'a.RecurrenceRule.ToString() ' with the recurrence string value.

RecurrenceRule parsedRule;   
                RecurrenceRule.TryParse(a.RecurrenceRule.ToString(), out parsedRule);   
    
                //If a recurring appointment does not have specified end time it will have      
                //endless occurrences. In this case you can explicitly put a restriction:      
                //parsedRule.SetEffectiveRange(DateTime.Now.AddYears(-1), DateTime.Now.AddYears(1));      
                foreach (DateTime occurrence in parsedRule.Occurrences)   
                {   
                    table1.Rows.Add(new string[] { a.Subject.ToString(), occurrence.ToString(), occurrence.Add(a.Duration).ToString() });   
                }



Regards,
Peter
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
Cipher
Top achievements
Rank 1
answered on 06 Dec 2010, 10:50 AM
Hello Peter,

Thank you for replying back to me.

We aren't using recurring appointments at the moment so I don't understand how this is related to our problem.


We need an instance of RadScheduler for every Room we have in the university campus for a given day. We need to generate all these RadScheduler instances at runtime.


Regards

Ciph
0
Peter
Telerik team
answered on 08 Dec 2010, 05:36 PM
Hello Cipher,

There shouldn't be a problem creating multiple instances of RadScheduler dynamically. Do you experience any problems? If yes, please send us the code of your implementation.

On a side note, have you considered using the resource grouping feature of RadScheduler?


Greetings,
Peter
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
Cipher
Top achievements
Rank 1
Answers by
Peter
Telerik team
Cipher
Top achievements
Rank 1
Share this question
or