We help IT Professionals succeed at work.

DataTable plugin & Rest

Isaac
Isaac asked
on
I am using the dataTable plugin but when I implement it, when I try to sort, search, etc., my data disappears.
Also, looking at the image below, even though there is data I see this "No data available in table".

Plugin
Any ideas?
Comment
Watch Question

Most Valuable Expert 2013
Awarded 2012
Commented:
Hi,
based on the info from the other question, you should avoid adding HTML TR records manually to the HTML DOM, but instead use the DataTables function rows.add() to pass the items from the SharePoint list.
Please see:
http://datatables.net/reference/api/row.add()
or
http://datatables.net/reference/api/rows.add()
Especially the final draw() method after the rows have been added.
HTH
Rainer
IsaacSharePoint Client Side Developer

Author

Commented:
Thanks.  That worked perfectly.