RadScheduler - Drag and drop - get_destinationHtmlElement issue

9 posts, 1 answers
  1. Suresh Sanghani
    Suresh Sanghani avatar
    4 posts
    Member since:
    Sep 2014

    Posted 13 Sep 2014 Link to this post

    function rowDropping1(sender, eventArgs) {
               
                var IndexValue = document.getElementById('<%=ddlCrew.ClientID %>').selectedIndex;
                var SelectedVal = document.getElementById('<%=ddlCrew.ClientID %>').options[IndexValue].value;

                
                if (SelectedVal == 0) {
                    alert("Must select a crew before scheduling.");
                    eventArgs.set.cancel(true);
                    return;
                }

                // Fired when the user drops a grid row      
                var htmlElement = eventArgs.get_destinationHtmlElement();
                var scheduler = $find('<%= radScheculer.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").value = timeSlot.get_index();
                    document.getElementById("<%=TargetSlotHiddenField.ClientID %>").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);
                }
            }


    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")
            }
    In Above two functions, there is a statement as below,

    var htmlElement = eventArgs.get_destinationHtmlElement();

    This statement returns incorrect html on row dropping over scheduler from grid.
    This only happens with Crome. In Mozilla its works well and as expected. 

    I feel that in some Crome version its working correctly and for others its returns wrong elements
    i.e its return gridrow td element instead of scheduler td element.

    Please some buddy fix it! 

    Thanks in advance!



  2. Suresh Sanghani
    Suresh Sanghani avatar
    4 posts
    Member since:
    Sep 2014

    Posted 16 Sep 2014 Link to this post

    Please some one take concern about this problem.

    Online demo for Scheduler Drag - Drop appointment from grid has also same problem.

    So please give attention.

    Thank you. 
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 17 Sep 2014 Link to this post

    Hello,

    I have tested the described scenario on our on-line demo but could not observe any error. Here you can see a video of my test. Please review it and let me know what else should I do in order to be able to replicate the issue and be more helpful with a possible solution.


    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Frank
    Frank avatar
    4 posts
    Member since:
    Sep 2010

    Posted 11 Dec 2014 Link to this post

    I have the same problem.
    The problem only occurs if your chrome browser is not in 100% view. Put it on 90% view, drag an item and the problem occurs.
  6. Frank
    Frank avatar
    4 posts
    Member since:
    Sep 2010

    Posted 11 Dec 2014 in reply to Frank Link to this post

    A drag from a listview has exactly the same problem. If Chrome is not 100% it returns the dragged rows i.o. the destination html element.
  7. Frank
    Frank avatar
    4 posts
    Member since:
    Sep 2010

    Posted 11 Dec 2014 Link to this post

    I have also tested the demo (http://demos.telerik.com/aspnet-ajax/scheduler/examples/draganddropintegration/defaultcs.aspx?product=scheduler) width chrome on 90% and there we have the same problem.
  8. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 15 Dec 2014 Link to this post

    Hello Frank,

    The issue is cause by a browser bug in Chrome when zoomed in that looses the target drag element when performing drag and drop. 

    Hope this will explain the issue.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  9. Frank
    Frank avatar
    4 posts
    Member since:
    Sep 2010

    Posted 15 Dec 2014 in reply to Plamen Link to this post

    Hi Plamen,
    it explains the issue, but it does not solve the issue.
    Is there a browser fix available? Does google know about this browser bug?
    If there is no browser fix, how can we workaround the bug?

    Regards,
    Frank
  10. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 18 Dec 2014 Link to this post

    Hello Frank,

    I have inspected the issue deeper and it seems that I have misled you a bit in my previous reply - please excuse me for this. The issue is a known bug in RadGrid control that is logged in our feedback portal here. You can follow it there and vote for it.

    I have consulted with the developers team and unfortunately at the moment there is no a known workaround for it but I have increased its fixing priority and we will do our best to fix it as soon as possible.

    Hope this will explain the issue.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

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