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

selected resource OnClientTimeSlotClick

3 Answers 54 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
lital
Top achievements
Rank 1
lital asked on 10 Jun 2008, 06:07 AM
I have Schedular control that include 3 resources, on OnClientTimeSlotClick event I need to know which resource is selected.

thanks,

3 Answers, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 12 Jun 2008, 10:15 AM
Hi lital,

You can use eventArgs.get_targetSlot().get_resource() to get the resource associated with the clicked slot.

Greetings,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
EZNet Support
Top achievements
Rank 1
answered on 11 May 2011, 09:51 PM
function OnClientTimeSlotClick(sender, eventArgs)
 {
 
          var strResourceID = eventArgs.get_targetSlot().get_resource()
        
 }

I am trying to what the Original Poster was trying to do im running into a problem following the response in this thread.


This event which is triggered from the RadScheduler Control

OnClientTimeSlotClick="OnClientTimeSlotClick"

This suggestion does not give the resource ID of the selected TimeSlot.
According to your documentation the only 2 are:
  • get_time() - returns the time of the slot that was clicked.
  • get_domEvent() -returns a reference to the raw DOM event.

http://www.telerik.com/help/aspnet-ajax/scheduler-onclienttimeslotclick.html
0
Veronica
Telerik team
answered on 16 May 2011, 08:36 AM
Hello JERRY STABLER,

Please note that our documentation is not very precise. We are doing our best to update it but sometimes we just omit some articles. What Dimitar suggested is correct. You can take the text of the current Resource when you click on a timeslot by this code:

function OnClientTimeSlotClick(sender, args) {
            alert(args.get_targetSlot().get_resource().get_text());
        }

So if you have grouped the RadScheduler by "Room" resources as shown in this demo - you will get "Margaret Morrison Main Room" or "Black Auditorium" as a result from the code above.

All the best,
Veronica Milcheva
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
lital
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
EZNet Support
Top achievements
Rank 1
Veronica
Telerik team
Share this question
or