i have datatable sortable column. clicking header sorts it. far good. however, after sorting, want iterate cells in column. this:
datatable.column(".latest").nodes().each(function (node, index, dt) { var the_cell = this.cell(index, '.sto_bid').node();
however, pulls cell before column sorted. in other words, index=0 pulling last cell in column. how reset indexes when sort, cell(0, '.sto_bid') return first cell shown in table?
the docs seem suggest calling draw() need - resets data. doesn't me when first:
datatable.draw()
the ordering index still backwards.
here's did:
// custom sort function on raw data array sortfilteredgriddata(); // remove rows table table.clear(); // add data table table.rows.add(filteredgriddata); // have fixed header table.fixedheader.adjust(); // re-draw table.draw();
Comments
Post a Comment