HI all,
New to datatables, been searching and reading for a couple days - maybe I'm asking the wrong questions?
I have a phonegap app that is only occasionally connected. I would like to use local SQLite table on the client as the data source for a datatable.
I don't see an issue with that. How do you normally read data out of a local SQL table? Just use that same approach and feed the data through to DataTables. If you need guidance on using a local SQL table for offline storage, I would suggest asking somewhere like StackOverflow as it is outside the scope of this forum.
Hi Allan,
Normally I loop over the result set and append html to the tbody then refresh.
I was wondering if something could be done more efficiently with the data option.
You could use row.add() or rows.add() to basically do the same thing. You can give it an HTML -tag tr` element to parse, or for better performance just give it the data structure expected for the row.
Replies
I don't see an issue with that. How do you normally read data out of a local SQL table? Just use that same approach and feed the data through to DataTables. If you need guidance on using a local SQL table for offline storage, I would suggest asking somewhere like StackOverflow as it is outside the scope of this forum.
Allan
Hi Allan,
Normally I loop over the result set and append html to the tbody then refresh.
I was wondering if something could be done more efficiently with the data option.
thanks,
You could use
row.add()
orrows.add()
to basically do the same thing. You can give it an HTML -tag tr` element to parse, or for better performance just give it the data structure expected for the row.Allan