Drag and Drop From RadGrid onto RadScheduler

2 posts, 0 answers
  1. Walkabout
    Walkabout avatar
    1 posts
    Member since:
    Jan 2012

    Posted 25 Jan 2012 Link to this post

    I've just upgraded to the latest version of telerik to take advantage of the new drag and drop functionality, however I'm having trouble using this feature on my Motorola Droid X. The examples I've found online haven't been too helpful.  I have the following client settings on both the grid and the scheduler.
            <ClientSettings AllowRowsDragDrop="True">
                <Selecting AllowRowSelect="True" />
                <ClientEvents OnRowDropping="rowDropping" />
            </ClientSettings>
     
     
     
    function rowDropping(sender, eventArgs) {
        // Fired when the user drops a grid row
        var htmlElement = eventArgs.get_destinationHtmlElement();
     
        var scheduler = $find('<%= RadScheduler1.ClientID %>');
        scheduler.get_element().style.width = k.SchedulerPreferences.SchedulerWidth + "px";
        scheduler.repaint();
        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();
            // 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);
        }
        refreshPage()
    }


    What am I Missing? Any help would be much appreciated!
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 27 Jan 2012 Link to this post

    Hi,

    We haven't really tested our intergration example in such environment. I will take a note of your case and we will consider expanding our test cases in the future.


    Greetings,
    Peter
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top