i trying to drag a node to radscheduler, but the event node_Drop not fire, post some code:
<
telerik:RadScheduler
ID
=
"radGantt"
runat
=
"server"
DataDescriptionField
=
"Subject"
DataEndField
=
"End"
DataKeyField
=
"ID"
DataSourceID
=
"ObjectDataSource1"
DataStartField
=
"Start"
Height
=
"650px"
Width
=
"500px"
DataSubjectField
=
"Subject"
SelectedView
=
"WeekView"
FirstDayOfWeek
=
"Monday"
ShowAllDayRow
=
"False"
ShowFooter
=
"False"
ShowViewTabs
=
"False"
WorkDayEndTime
=
"19:00:00"
DayEndTime
=
"19:00:00"
Skin
=
"Office2007"
onnavigationcomplete
=
"radGantt_NavigationComplete"
onappointmentdelete
=
"radGantt_AppointmentDelete"
onappointmentupdate
=
"radGantt_AppointmentUpdate"
onappointmentcontextmenuitemclicked
=
"radGantt_AppointmentContextMenuItemClicked"
>
<
AppointmentContextMenus
>
<
telerik:RadSchedulerContextMenu
runat
=
"server"
ID
=
"SchedulerAppointmentContextMenu"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Visualizza ODL"
Value
=
"ODL"
/>
<
telerik:RadMenuItem
Text
=
"Visualizza Richiesta"
Value
=
"REQ"
/>
<
telerik:RadMenuItem
Text
=
"Rapportino"
Value
=
"RAP"
/>
</
Items
>
</
telerik:RadSchedulerContextMenu
>
</
AppointmentContextMenus
>
</
telerik:RadScheduler
>
<
asp:ObjectDataSource
ID
=
"ObjectDataSource1"
runat
=
"server"
SelectMethod
=
"AllData"
TypeName
=
"FinitenessEVO.AppointmentList"
>
</
asp:ObjectDataSource
>
<
telerik:RadTreeView
runat
=
"server"
ID
=
"radTree"
Height
=
"100%"
Width
=
"100%"
EnableDragAndDrop
=
"True"
OnClientNodeDropping
=
"nodeDropping"
oncontextmenuitemclick
=
"radTree_ContextMenuItemClick"
onnodedrop
=
"radTree_NodeDrop"
>
<
CollapseAnimation
Duration
=
"100"
Type
=
"OutQuint"
/>
<
ContextMenus
>
<
telerik:RadTreeViewContextMenu
ID
=
"contextTree"
runat
=
"server"
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Visualizza ODL"
Value
=
"ODL"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Visualizza Richiesta"
Value
=
"REQ"
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadTreeViewContextMenu
>
</
ContextMenus
>
<
ExpandAnimation
Duration
=
"100"
/>
</
telerik:RadTreeView
>
<telerik:RadScriptBlock ID=
"RadScriptBlock1"
runat=
"server"
>
<script type=
"text/javascript"
>
function
nodeDropping(sender, eventArgs) {
// Fired when the user drops a TreeView node
var
node = eventArgs.get_sourceNode();
var
text = node.get_text();
var
htmlElement = eventArgs.get_htmlElement();
var
scheduler = $find(
'<%= radGantt.ClientID %>'
);
if
(isPartOfSchedulerAppointmentArea(htmlElement)) {
// The node 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.ClientID %>'
).value = timeSlot.get_index();
// The HTML needs to be set in order for the postback to execute normally
eventArgs.set_htmlElement(
"TargetSlotHiddenField.ClientID"
);
}
else
if
($telerik.isDescendant(treeViewElement, htmlElement)) {
// The node was dropped over the TreeView
// The HTML needs to be set in order for the postback to execute normally
eventArgs.set_destinationHtmlElement(treeViewElement);
}
else
{
// The node was dropped elsewhere on the document
eventArgs.set_cancel(
true
);
}
}
function
rowDropping(sender, eventArgs) {
// Fired when the user drops a grid row
var
htmlElement = eventArgs.get_destinationHtmlElement();
var
scheduler = $find(
'<%= radGantt.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.ClientID %>'
).value = timeSlot.get_index();
// The HTML needs to be set in order for the postback to execute normally
eventArgs.set_destinationHtmlElement(
"TargetSlotHiddenField.ClientID"
);
}
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"
)
}
function
onRowDoubleClick(sender, args) {
sender.get_masterTableView().editItem(args.get_itemIndexHierarchical());
}
function
refreshGrid() {
$find(
"<%= RadAjaxManager1.ClientID %>"
).ajaxRequest(
"Rebind"
);
}
</script>
</telerik:RadScriptBlock>
<input type=
"hidden"
runat=
"server"
id=
"TargetSlotHiddenField"
/>