Declined
Last Updated: 22 Jul 2020 16:04 by ADMIN
Thomas Brown
Created on: 11 Jun 2020 09:04
Category: Grid
Type: Bug Report
1
OnRowDropping event fires on Grid row selection

To reproduce the issue enable RowSelect and RowsDragDrop ClientSettings, and attach OnRowDropping  event listener

<ClientSettings AllowRowsDragDrop="true">
    <Selecting AllowRowSelect="true" />
    <ClientEvents OnRowDropping="function() {alert('RowDrooping event fired!');}"/>
</ClientSettings>

3 comments
ADMIN
Eyup
Posted on: 22 Jul 2020 16:04

Hello Thomas,
 

As mentioned in the formal ticket, these 2 functionalities are pretty much inter-correlated and it it strange that you don't face in in the version from 2012. Frankly, there are many releases between these 2 versions and a lot has changed and implemented. Nevertheless, here is a workaround you can use to resolve the issue:

            function rowDropping(sender, args) {
                if (sender.get_masterTableView()!= args.get_targetItemTableView().get_id() &&
                    args.get_draggedItems()[0].get_element().id != args.get_targetItemId()) {

                    // Continue
                    alert("Continue with your logic");
                }
            }

 

Regards,
Eyup
Progress Telerik

Thomas Brown
Posted on: 17 Jul 2020 22:36

Eyup,

I'm not sure about your response, but all I can tell you is that this behavior didn't happen in the "2012.2.607.40" Telerik version.  It's something new with the "2020.1.114.40" version I'm trying to upgrade to.

In the 2012 version, when I click on a row, it does NOT trigger the "OnRowDropping" client event.

So your answer doesn't really help me much.  So i may have to find a workaround for this.

Regards,

Thomas

ADMIN
Eyup
Posted on: 18 Jun 2020 06:02

Hi Thomas,

 

The Row Selection and Drag-n-Drop are inter-related. For example, there cannot be dragging of Rows if the AllowRowSelect property is set to false. 

When you start dragging a row, it gets automatically selected:
https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/drag-and-drop-of-grid-items#row-selection

Similarly, even a slight mousedown-mouseup action (the definition of a mouse click) over the item means a very quick drag-n-drop, because once the users initiates a mouse-down action, the row begins to drag until the next mouse-up action. There is no way for the grid to tell whether the initiated dragging will end in 1 millisecond (simple selection) or in 1 minute (full dragging).

I hope this makes sense.

 

Regards,
Eyup
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.