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

Draggable Grid

5 Answers 198 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Felipe Casanova
Top achievements
Rank 1
Felipe Casanova asked on 07 Mar 2013, 02:50 PM
Hi,

I have implemented the following example : http://jsfiddle.net/UsCFK/22/

I have it working but would like to apply some styling. Namely, when the current row being dragged passes across underlying rows, I would like to apply styles to the underlying rows.

Thanks

5 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 11 Mar 2013, 02:30 PM
Hello Matt,

In order to achieve the desired outcome you should detect which row in the Grid is under the cursor while dragging. For this purpose you can use the dragenter / dragleave events and set / remove some custom styling to the row which is under the cursor. 
 
Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Felipe Casanova
Top achievements
Rank 1
answered on 18 Apr 2013, 10:58 AM
Hi,

Thanks for the detailed response. I had looked at the one line documentation items pertaining to the enter/leave events but dont really see how they are going to help me. What would help is an example.

I've tried capturing the enter/leave events but as my cursor is already on an object (the one being dragged) I'm not 100% clear on how I'm supposed to detect when it is passing over the underlying table row.

Any assistance / example of this in operation would be much appreciated.
Thanks

0
Iliana Dyankova
Telerik team
answered on 22 Apr 2013, 12:20 PM
Hello Matt,

The discussed functionality is not supported out-of-the-box and its implementation requires additional code. As another approach you could use the drag event of the Draggable - a possible implementation is demonstrated in the updated jsFiddle example.

Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mark baer
Top achievements
Rank 1
answered on 18 Dec 2013, 12:23 AM
Iliana, we are trying to reorder rows using Draggable, but if you look at the example you recommended, the inline editing doesn't work very well.  Is there a better way to handle this?  Is there another example using inline editing?

Thanks

Mark Baer
Burbank, Ca
0
Alexander Valchev
Telerik team
answered on 19 Dec 2013, 08:19 AM
Hi Mark,

We discussed the problem which occurs when the inline editing editing feature is enabled in a support ticket.
The solution is to filter that row in the following way:

grid.table.kendoDraggable({
    filter: "tbody > tr:not(.k-grid-edit-row)",


Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Felipe Casanova
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Felipe Casanova
Top achievements
Rank 1
mark baer
Top achievements
Rank 1
Alexander Valchev
Telerik team
Share this question
or