angular-datatables icon indicating copy to clipboard operation
angular-datatables copied to clipboard

Include RowReorder on the demo site

Open jmelosegui opened this issue 10 years ago • 2 comments

It would be nice to have an example of the RowReorder feature on the demo site.

jmelosegui avatar Jul 27 '16 20:07 jmelosegui

I think I figure it out. The key part is to provide jquery datatable with the property you want to update after reordering. In may case it was order, so I added the following option.

 vm.dtOptions = dtOptionsBuilder.fromFnPromise(function () {
                                 return getDataSource();
                           })
                           .withOption('rowReorder', { dataSrc: 'order' });

If you need to handle the 'row-reorder' event take a look at issue #564

jmelosegui avatar Jul 27 '16 21:07 jmelosegui

@jmelosegui I am using AngularJS 1.5 and I am using angular-datatables but I cannot see plugin for rowReorder. How did you add it?

niteshvirani avatar Mar 15 '24 12:03 niteshvirani