This is a migrated thread and some comments may be shown as answers.

RadScheduler - Drag and drop - get_destinationHtmlElement issue

8 Answers 72 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Suresh Sanghani
Top achievements
Rank 1
Suresh Sanghani asked on 13 Sep 2014, 06:03 AM
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!



8 Answers, 1 is accepted

Sort by
0
Suresh Sanghani
Top achievements
Rank 1
answered on 16 Sep 2014, 08:30 AM
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. 
0
Accepted
Plamen
Telerik team
answered on 17 Sep 2014, 01:23 PM
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.

 
0
Frank
Top achievements
Rank 1
answered on 11 Dec 2014, 01:30 PM
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.
0
Frank
Top achievements
Rank 1
answered on 11 Dec 2014, 01:43 PM
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.
0
Frank
Top achievements
Rank 1
answered on 11 Dec 2014, 01:46 PM
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.
0
Plamen
Telerik team
answered on 15 Dec 2014, 11:36 AM
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.

 
0
Frank
Top achievements
Rank 1
answered on 15 Dec 2014, 02:04 PM
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
0
Plamen
Telerik team
answered on 18 Dec 2014, 08:02 AM
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.

 
Tags
Scheduler
Asked by
Suresh Sanghani
Top achievements
Rank 1
Answers by
Suresh Sanghani
Top achievements
Rank 1
Plamen
Telerik team
Frank
Top achievements
Rank 1
Share this question
or