function rowDropping1(sender, eventArgs) {
var IndexValue = document.getElementById('<%=ddlCrew.ClientID %>').selectedIndex;
var SelectedVal = document.getElementById('<%=ddlCrew.ClientID %>').options[IndexValue].value;
if (SelectedVal == 0) {
alert("Must select a crew before scheduling.");
eventArgs.set.cancel(true);
return;
}
// Fired when the user drops a grid row
var htmlElement = eventArgs.get_destinationHtmlElement();
var scheduler = $find('<%= radScheculer.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();
document.getElementById("<%=TargetSlotHiddenField.ClientID %>").value = timeSlot.get_index();
// The HTML needs to be set in order for the postback to execute normally
eventArgs.set_destinationHtmlElement("TargetSlotHiddenField");
}
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 Above two functions, there is a statement as below,
var htmlElement = eventArgs.get_destinationHtmlElement();
This statement returns incorrect html on row dropping over scheduler from grid.
This only happens with Crome. In Mozilla its works well and as expected.
I feel that in some Crome version its working correctly and for others its returns wrong elements
i.e its return gridrow td element instead of scheduler td element.
Please some buddy fix it!
Thanks in advance!
var IndexValue = document.getElementById('<%=ddlCrew.ClientID %>').selectedIndex;
var SelectedVal = document.getElementById('<%=ddlCrew.ClientID %>').options[IndexValue].value;
if (SelectedVal == 0) {
alert("Must select a crew before scheduling.");
eventArgs.set.cancel(true);
return;
}
// Fired when the user drops a grid row
var htmlElement = eventArgs.get_destinationHtmlElement();
var scheduler = $find('<%= radScheculer.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();
document.getElementById("<%=TargetSlotHiddenField.ClientID %>").value = timeSlot.get_index();
// The HTML needs to be set in order for the postback to execute normally
eventArgs.set_destinationHtmlElement("TargetSlotHiddenField");
}
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 Above two functions, there is a statement as below,
var htmlElement = eventArgs.get_destinationHtmlElement();
This statement returns incorrect html on row dropping over scheduler from grid.
This only happens with Crome. In Mozilla its works well and as expected.
I feel that in some Crome version its working correctly and for others its returns wrong elements
i.e its return gridrow td element instead of scheduler td element.
Please some buddy fix it!
Thanks in advance!