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

Get resource ID OnClientAppointmentInserting

1 Answer 74 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Gilbert
Top achievements
Rank 1
Gilbert asked on 23 Nov 2012, 02:23 PM
Hi,

I'm looking for a way to get the resource id that i've grouped my scheduler by in javascript. Is this possible?
Using OnClientAppointmentInserting i can get the start time and is all day properties. Is there any way to get the room id that i have grouped by?

function AppointmentInserting(sender, eventArgs) {
                    var start = formatDate(eventArgs.get_startTime());
                    var isAllDay = eventArgs.get_isAllDay();
                    alert(start);
                    alert(isAllDay);
                    eventArgs.set_cancel(true);
                }

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 26 Nov 2012, 10:54 AM
Hello Gilbert,

Thank you for contacting Telerik support.

You can get the name of the resource that is grouping RadScheduler by using the get_groupBy() method of its client object and you can get the resource of the time slot by using the get_resource() method of the timeslot's client object:

Copy Code
function OnClientAppointmentInserting(sender, args) {
               alert(sender.get_groupBy());
               alert(args.get_targetSlot().get_resource());
 
           }

Hope this will be helpful. 

All the best,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Gilbert
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or