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

Drag to reorder rows in Kendo Grid with Angular

5 Answers 696 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 04 Dec 2014, 07:43 PM
I found a JSFiddle (http://jsfiddle.net/saAfL/240/) that shows me how to do drag and drop reordering of rows, but was wondering if there is a preferred way to make this work inside an Angular controller. Currently I'm providing all grid options using k-options. Is there a way to specify draggable and droptarget in an Angular way?

5 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 05 Dec 2014, 12:42 PM
Hello Richard,

I don't think there's Angular specific syntax which differentiates the implementation presented in the jsfiddle demo, i.e. you should be able to use the logic as is in an Angular enabled application.

Note that for the same purpose you can also use the integration with the sortable widget demonstrated in this demo.

Best regards,
Sebastian
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Richard
Top achievements
Rank 1
answered on 05 Dec 2014, 01:17 PM
Ok, thanks for clarification. Basically I'm looking for a way to not have all that UI code inside my controller. I'm wondering if I could make a directive to handle it instead.
0
Sebastian
Telerik team
answered on 08 Dec 2014, 12:09 PM
Hi again Richard,

I'm not sure how this code can be isolated in an Angular directive, however in case you are able to do that, feel free to share your solution in this forum thread.

Regards,
Sebastian
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Tim
Top achievements
Rank 1
answered on 13 Aug 2015, 06:23 AM

I am also stuck attempting to get this working in angular using grid and a kendo datasource. Here is a sample in angular:

http://dojo.telerik.com/agIvU

I am not able to get a row based drag and drop sorting working. The drag event picks up the entire grid. I'd like to be able to drag one row and place it in front of the other.

 Any Ideas? What am I missing?

0
Petyo
Telerik team
answered on 17 Aug 2015, 07:21 AM

Hello Tim,

using multiple kendo ui directives over the same element is not supported and will lead to unexpected results. I may suggest that you create your own custom directive wrapper, which does something like this in its link method.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Integration with other JS libraries
Asked by
Richard
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Richard
Top achievements
Rank 1
Tim
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or