Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function to get the current order list #49

Open
mmjamal opened this issue Aug 17, 2015 · 2 comments
Open

function to get the current order list #49

mmjamal opened this issue Aug 17, 2015 · 2 comments

Comments

@mmjamal
Copy link

mmjamal commented Aug 17, 2015

Hello this plugin looks great,however is there any doco related to getting
the order list,

Just need to know in the following cases.
Once the dragtable is applied to a table - how can i get the current order list.?

@ainglese
Copy link

@mmjamal have you solved your issue? i have a similar one, i'm tring to solve looking here http://akottr.github.io/dragtable/

see

$('#localStorageTable').dragtable({ 
    persistState: function(table) { 
      if (!window.sessionStorage) return; 
      var ss = window.sessionStorage; 
      table.el.find('th').each(function(i) { 
        if(this.id != '') {table.sortOrder[this.id]=i;} 
      }); 
      ss.setItem('tableorder',JSON.stringify(table.sortOrder)); 
    }, 
    restoreState: eval('(' + window.sessionStorage.getItem('tableorder') + ')') 
}); 

@UsmanJavedAttari
Copy link

@ainglese it's not working for large tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants