Simple question about Drag and drop

5 posts, 0 answers
  1. Teija
    Teija avatar
    23 posts
    Member since:
    Oct 2008

    Posted 07 Jan 2010 Link to this post

    Hi

    What event is fired after a drag and drop occurs? If I want to save the new date for the appointment.

    /Mathias
  2. Dimitar Milushev
    Admin
    Dimitar Milushev avatar
    555 posts

    Posted 08 Jan 2010 Link to this post

    Hi Mathias,

    The server-side event AppointmentUpdate is fired for all changes to an Appointment - resize, drag'n'drop, etc.

    All the best,
    Dimitar Milushev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Charles Henderson
    Charles Henderson avatar
    4 posts
    Member since:
    Dec 2009

    Posted 15 Jan 2010 Link to this post

    Ok, I've got the onappointmentupdate event hooked up and when I drag and drop it, it does not fire.  No error messages, when the page finishes it's refresh, the appointment moves back to it's original slot.  Any ideas why this is happening?  The InlineInsertTemplate is working properly.  I've included the set up of my scheduler below and the update statement.  I don't know where it's failing specifically, so I can't provide more.

    <telerik:RadScheduler ID="radScheduler" runat="server" 
            DataKeyField="Id"   
            DataEndField="End"   
            DataSubjectField="Subject"   
            DataStartField="Start"   
            SelectedView="WeekView"   
            onappointmentupdate="radScheduler_AppointmentUpdate"   
            onappointmentinsert="radScheduler_AppointmentInsert" Skin="Office2007" 
            onformcreated="radScheduler_FormCreated" 
               
            Height="90%" 
            > 
            <AdvancedForm Modal="true" /> 
            <AppointmentTemplate> 
            <div id="AppointmentTemplate" class="rsCustomAppointmentContainer">  
                    <span class="rsCustomAppointmentContainerInner">  
                        <asp:Label ID="SubjectLabel" runat="server" Text='<%# Bind("Subject") %>' Width="90%" /> 
                        <br /> 
                        <asp:Label ID="DateStart" runat="server" Text='<%# Bind("Start") %>'/>-<asp:Label ID="DateEnd" runat="server" /> 
                    </span> 
                </div> 
            </AppointmentTemplate> 
            <InlineInsertTemplate> 
                <div id="InlineInsertTemplate" class="rsCustomAppointmentContainer">  
                    <span class="rsCustomAppointmentContainerInner">  
                        <asp:Label ID="SubjectLabel" runat="server" Text='<%# Bind("Subject") %>' Width="90%" /> 
                         <asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert">  
                            <asp:Image runat="server" ID="insertImage" ImageUrl="Images/ok.png" AlternateText="update" /> 
                        </asp:LinkButton> 
     
                       <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel">  
                           <asp:Image runat="server" ID="Image3" ImageUrl="Images/cancel.png" AlternateText="cancel" /> 
                       </asp:LinkButton> 
                    </span> 
                </div> 
            </InlineInsertTemplate> 
        </telerik:RadScheduler> 

    protected void radScheduler_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)  
            {  
                AppointmentInfo ai = FindByID(e.ModifiedAppointment.ID.ToString());  
     
                crmApptData.UpdateAppointment(ai);  
            } 
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 19 Jan 2010 Link to this post

    Hello Charles,

    The problem could be with your AppointmentInfo class. I have attached a simple working demo for reference.


    Kind regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Charles Henderson
    Charles Henderson avatar
    4 posts
    Member since:
    Dec 2009

    Posted 19 Jan 2010 Link to this post

    Yes, through the use of the source code that we purchased along with our subscription I was able to track it down to some issues with my AppointmentInfo class and the way it was handling the data coming from my Dynamics CRM data access layer.  I had incorrectly mapped the resource id's.

    Thanks for your reply.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017