Help Allan or someone else much smarter than me...
Help Allan or someone else much smarter than me...
rvgraham
Posts: 28Questions: 5Answers: 0
In reference to previous discussion:
https://datatables.net/forums/discussion/19007/finding-page-and-row-when-using-bdeferrender-on-large-dataset
I initially gave up on upgrading to 1.10, but now I'm going through with it.
Using your example: var pos = $.inArray(myValue, table.column(0, { order: 'current' }).data());
I get an error that table doesn't have a column property.
Am I misunderstanding somewhere this code has a placeholder? Or is it not correct?
Thanks, Bob
This discussion has been closed.
Answers
Well, partially answered my own question, I needed to capitalize DataTable() to have the right kind of object. Struggling through the rest of the differences between 1.9 "dataTable()" and the new implementation.
Hi Bob,
Good to hear you managed to access the API now. I possibly should have called it
dataTableApi()
perhaps...Allan
Yes, this is working for me now... but there are a lot of changes! Most probably due to whether or not you DataTable() or you dataTable().
I'm trying to reapply the colReorder when the user reloads the table with altered parameters, but the columns come back off by one, maybe the key column needs to be added or subtracted?
When they enter the procedure that reloads the table I call:
var colOrder = colReorder.fnOrder()
Then after loading the table I call:
colReorder.fnOrder(colOrder);
But when I do the columns come back in the proper location but the two headers have moved instead of one, and they're off by one.
I'm using a two row thead with inputs and selects in the second row for individual column filtering.
Thanks, Bob
Hi Bob,
Can you link me to a test case show I can take a look? If you aren't already, I would suggest using object based data when using ColReorder - it makes everything massively easier, since you don't need to remap array indexes.
Allan