Hi
I have UpdatePanel, RadDocks, RadDockZones, and RadDockLayout created dynamically. All the Docks are set AutoPostBack=true, and they are outside the UpdatePanel but UpdatePanel is configured to conditionally ajaxify the docks.
I have developed a portal where, in design mode, you can move around the contents and the layout is saved automatically.
Now I added a new feature, where the content is hidden while being dragged.
I made use of the following javascript code,
of course the OnClientDragStart and OnClientDragEnd are set to those functions.
The problem is that this works only once for each of the docks. When I start the drag, the dock becomes Orange panel, and when I drop it, it restores the original content. However, that dock can no longer be dragged... and the post back didn't seem to occur because when I refresh the page by pressing F5, the layout has not been saved.
What's wrong with the javascript?
I have UpdatePanel, RadDocks, RadDockZones, and RadDockLayout created dynamically. All the Docks are set AutoPostBack=true, and they are outside the UpdatePanel but UpdatePanel is configured to conditionally ajaxify the docks.
I have developed a portal where, in design mode, you can move around the contents and the layout is saved automatically.
Now I added a new feature, where the content is hidden while being dragged.
I made use of the following javascript code,
var oldcontainer; |
var oldbackground; |
function RadDockOnDragStart(dock,args){ |
var container = dock._element; |
oldcontainer = container.innerHTML; |
oldbackground = container.style.backgroundColor; |
container.innerHTML=''; |
container.style.backgroundColor = 'Orange'; |
} |
function RadDockOnDragEnd(dock,args){ |
var container = dock._element; |
container.innerHTML=oldcontainer; |
container.style.backgroundColor = oldbackground; |
} |
of course the OnClientDragStart and OnClientDragEnd are set to those functions.
The problem is that this works only once for each of the docks. When I start the drag, the dock becomes Orange panel, and when I drop it, it restores the original content. However, that dock can no longer be dragged... and the post back didn't seem to occur because when I refresh the page by pressing F5, the layout has not been saved.
What's wrong with the javascript?