on TimeSlot Click ,Can we get ResourceID if resource grouping is there

2 posts, 0 answers
  1. Venkat
    Venkat avatar
    1 posts
    Member since:
    Jun 2010

    Posted 22 Sep 2010 Link to this post

    Hi....
         Is there a way that we can get the resourceID when there is a resource grouping done in OnClientTimeSlotClick event.

    Thanks in advance.
    Venkat

    Got it....

     

     

    function OnClientTimeSlotClick(sender, eventArgs) {

     

    var

     

     

    slot = eventArgs.get_targetSlot();

     

     

     

     

    var

     

     

    currentRoom = slot.get_resource(); 
    }
    or

     

    function

     

     

    OnClientAppointmentInserting(sender, eventArgs) {

     

     

     

    var slot = eventArgs.get_targetSlot();

     

     

     

    var start = slot.get_startTime();

     

     

     

    var end = slot.get_endTime();

     

     

     

    var currentRoom = slot.get_resource();

     

    eventArgs.set_cancel(

     

    true);

     

    }

  2. Olivier
    Olivier avatar
    146 posts
    Member since:
    Nov 2010

    Posted 14 Jan 2015 Link to this post

    You can add the custom attributes

    protected void RadScheduler3_ResourceHeaderCreated(object sender,ResourceHeaderCreatedEventArgs e) {
                    e.Container.Resource.Attributes["user_id"] = e.Container.Resource.Key.ToString();
    }
          

    And to get this in Appointementinserting

      function AppointmentInserting(sender, eventArgs) {
                 
                var scheduler = sender;
                var slot = eventArgs.get_targetSlot();
                alert(slot.get_resource().get_attributes().getAttribute("user_id"));
     
    }


    Olivier
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top