How to tell if a column is being sorted?
How to tell if a column is being sorted?
I'm using a combination of server-side processing and jeditable. I'd like to make it so it only gets the ajax data after an edit if the column they are editing is being sorted. My thinking is there is no reason for the extra load (and losing the user's place on the scroll as a result) unless the change will ultimately affect the sorting. How would I go about doing this? Let me know if this doesn't make sense, or if there's a better way to go about doing this.
EDIT: I think I found what I'm after here: http://datatables.net/forums/discussion/11390/how-to-get-values-of-the-current-sort-column-index-and-direction-from-aodata/p1
EDIT: I think I found what I'm after here: http://datatables.net/forums/discussion/11390/how-to-get-values-of-the-current-sort-column-index-and-direction-from-aodata/p1
This discussion has been closed.
Replies
Sorry I don't have a better answer at the moment.
Allan
[code]
if(row_ed_num != '0')
{
oTable.fnSettings().oScroller.fnScrollToRow(row_ed_num);
row_ed_num = '0';
}
[/code]
I alert the row_ed_num value inside the condition, and it does display the proper row #. However, it sits there for a few seconds, then displays the results from row 1 again, regardless of the value of row_ed_num. Is there something that fires after fndrawcallback function where I need to put that?