Sort Not working when adding rows to table.
Sort Not working when adding rows to table.
Hey, so i'm having an issue when it comes to sorting. I'm adding my rows into the table dynamically using the add.row().
However, the rows inserted are not sorting accordingly. I believe i'm setting up the data-order properly.
An example of what I have
var rownum = mytable.row.add(result).node();
$(rownum).find('td').eq(0).css('width','50px');
$(rownum).find('td').eq(2).attr('data-order', a[i].data1);
$(rownum).find('td').eq(3).attr('data-order', a[i].datat2);
$(rownum).find('td').eq(4).attr('data-order', a[i].data3);
$(rownum).find('td').eq(5).attr('data-order', a[i].data4);
$(rownum).find('td').eq(6).attr('data-order', a[i].data5);
Any advice would be great.
Thank you!