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

Dragging Items to Scheduler

2 Answers 61 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 25 Jun 2012, 04:10 PM
I have a situation where I am dragging a list box item to one of two scheduler controls on the page.  How would I determine which of the two schedulers was the destination location.  I have followed the Drag and Drop example with the scheduler and datagrid controls.

2 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 26 Jun 2012, 06:49 AM
Hi Andy,

 
You can check if you are in the particular RadScheduler by using its exact id in the function isPartOfSchedulerAppointmentArea as in the code below:

function isPartOfSchedulerAppointmentArea(htmlElement) {
                // Determines if an html element is part of the scheduler appointment area
                // This can be either the rsContent or the rsAllDay div (in day and week view)
                 
                return $telerik.$(htmlElement).parents().is("div.rsAllDay") ||
    $telerik.$(htmlElement).parents().is("div.rsContent") ||
    $telerik.$(htmlElement).parents().is("#RadScheduler1")
            }

Hope this will help you.

Kind regards,
Plamen Zdravkov
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.
0
Andy
Top achievements
Rank 1
answered on 26 Jun 2012, 01:35 PM
Works great.  Only change I had to make was changing changing the and/or logic to the following
    return ($telerik.$(htmlElement).parents().is("div.rsAllDay") ||
           $telerik.$(htmlElement).parents().is("div.rsContent") ) &&
           $telerik.$(htmlElement).parents().is("#RadScheduler1")

   

 

 

Tags
Scheduler
Asked by
Andy
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Andy
Top achievements
Rank 1
Share this question
or