function rowDropping(sender, eventArgs)
{
var htmlElement = eventArgs.get_destinationHtmlElement();
var scheduler = $find('<%= radScheduleCalender1.ClientID %>');
if (isPartOfSchedulerAppointmentArea(htmlElement))
{
// The row was dropped over the scheduler appointment area
// Find the exact time slot and save its unique index in the hidden field
var timeSlot = scheduler._activeModel.getTimeSlotFromDomElement(htmlElement);
//$get("TargetSlotHiddenField").value = timeSlot.get_index();
// The HTML needs to be set in order for the postback to execute normally
eventArgs.set_destinationHtmlElement(
"hFieldGridDropData");
}
else
{
// The node was dropped elsewhere on the document
eventArgs.set_cancel(
true);
}
}
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")
}
In the code currently, I am using object of first Radscheduler.
i.e. "var scheduler = $find('<%= radScheduleCalender1.ClientID %>'); "
Instead of hardcoding I want to get ID of the Radscheduler on which user will be dropping an item.
Can anyone help me out please ?
Also, the line
" $telerik.$(htmlElement).parents().is("div.rsAllDay") || $telerik.$(htmlElement).parents().is("div.rsContent")" is giving an error " Object does not supports this property".
Best Regards,
Hrushikesh.
