4

I am using angularjs and have a simple table. I use the following code

<table id="searchObjResults">
  <tr><th>Name</th><th>Phone</th></tr>
  <tr ng-repeat="friendObj in friends | filter:search:strict">
    <td>{{friendObj.name}}</td>
    <td>{{friendObj.phone}}</td>
  </tr>
</table>

Is there any simple way through which user can arrange the rows in list. User actually wants to take printout of the table and want the rows ordered in required fashion in printed paper.

raju
  • 4,788
  • 15
  • 64
  • 119

1 Answers1

4

Either you can define your own directive or go for some third party plugins which are discussed in below link,

Drag drop table rows

Github third party plugin for drag drop

Community
  • 1
  • 1
  • I tried to mock the jsfiddle in http://jsfiddle.net/9z4zn9uz/. For some reason I cant drag and drop. I tried in my website also and I cant move the rows! – raju Jan 16 '15 at 08:27
  • I compared the js fiddles, it seems the functionality works only in Jquery 1.8.3 version and below , you have used 2.1.0. I will try to find some other solution. Quick fix is to use v1.8.3 – Janaki Sathiyamurthy Jan 16 '15 at 09:53
  • Try this , [Github - drag and drop angularjs style](https://github.com/codef0rmer/angular-dragdrop) – Janaki Sathiyamurthy Jan 16 '15 at 10:02