Hello,
I have 2 developing environments. I have developed a sharepoint project where I include the drag and drop feature from the RadGrid to RadSchdeuler. When I drag and drop an item to the schdeuler, I am showing a RadDock as a Popup from client side using
Sys.Application.add_load(openForm);
So that it will show my appointment editing window. In one environment it is working and in the other one when I drag and drop it is giving me a script exception.
"Error: Sys.InvalidOperationException: Type Telerik.Web.UI.Orientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded."
If I remove that Sys.Application.add_load(openForm); then it wont give me an error, but it wont load the dock.
The Dock
The function to show the popup
Drag-n-Drop function
I am also doing this on the OnInit of the function of the page.
http://www.telerik.com/community/forums/aspnet-ajax/scheduler/asp-updatepanel-and-radscheduler-issues.aspx
I did this because the navigation from day to week etc in the RadSchdeuler.
Any help on this would be gladly accepted.
I have 2 developing environments. I have developed a sharepoint project where I include the drag and drop feature from the RadGrid to RadSchdeuler. When I drag and drop an item to the schdeuler, I am showing a RadDock as a Popup from client side using
Sys.Application.add_load(openForm);
So that it will show my appointment editing window. In one environment it is working and in the other one when I drag and drop it is giving me a script exception.
"Error: Sys.InvalidOperationException: Type Telerik.Web.UI.Orientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded."
If I remove that Sys.Application.add_load(openForm); then it wont give me an error, but it wont load the dock.
The Dock
<asp:Panel runat="server" ID="panelAlert"> <telerik:RadDock runat="server" ID="RadDockAlert" Width="350px" Height="120px" Closed="true" Style="z-index: 2000;" Title="Alert"> <Commands> <telerik:DockCloseCommand></telerik:DockCloseCommand> </Commands> <ContentTemplate> <div align="center"> <asp:Label ID="lbAlertMsg" runat="server"></asp:Label> </div> <br /> <div align="center"> <a onclick="hideAlertForm();" id="aAlertOK" runat="server"> <asp:Label ID="Label3" CssClass="spriteButtons popUpOkButton" runat="server">Ok</asp:Label> </a> </div> </ContentTemplate> </telerik:RadDock></asp:Panel>The function to show the popup
function openAlertForm() { var dock = $find("<%= RadDockAlert.ClientID %>"); // Center the RadDock on the screen var viewPort = $telerik.getViewPortSize(); var xPos = Math.round((viewPort.width - parseInt(dock.get_width())) / 2); var yPos = Math.round((viewPort.height - parseInt(dock.get_height())) / 2); $telerik.setLocation(dock.get_element(), { x: xPos, y: yPos }); dock.set_closed(false); Sys.Application.remove_load(openAlertForm);}Drag-n-Drop function
function rowDropping(sender, eventArgs) { // Fired when the user drops a grid row var htmlElement = eventArgs.get_destinationHtmlElement(); var scheduler = $find('<%= RadScheduler1.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); startDateTime = timeSlot.get_startTime(); Sys.Application.add_load(openForm); $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); } }I am also doing this on the OnInit of the function of the page.
http://www.telerik.com/community/forums/aspnet-ajax/scheduler/asp-updatepanel-and-radscheduler-issues.aspx
I did this because the navigation from day to week etc in the RadSchdeuler.
Any help on this would be gladly accepted.