Possible bug?
Possible bug?
greenjimmy
Posts: 4Questions: 1Answers: 0
If I add a new row using an html tr and the method datatable.rows.add().draw() the columns don't sort properly based off of the html attributes (data-order) for the columns in that row.
This discussion has been closed.
Answers
Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.
Information on how to create a test page, if you can't provide a link to your own page can be found here.
Thanks,
Allan
Here ya go:
http://live.datatables.net/qiyacufu/3/edit
Nice one - thanks. So the problem here is that DataTables HTML5 orthogonal data is detected when the table is initialised. If there are no rows in the table then it can't be detected.
There are two options:
columns.data
to specify the orthogonal data. This is a bit ugly, but it can be done like this.Allan
So I can just add that row before initializing and delete it afterward?
Oh and thank you :)
Yup - you could do that and it will allow the auto detection to operate.
Allan