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.

1
  • You need to write custom code for it or make your own directives. Commented Jan 16, 2015 at 6:45

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

3 Comments

I tried to mock the jsfiddle in jsfiddle.net/9z4zn9uz. For some reason I cant drag and drop. I tried in my website also and I cant move the rows!
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.