Combine DOM & AJAX datatables source - server side false - filter / search implications

Combine DOM & AJAX datatables source - server side false - filter / search implications

willgtwillgt Posts: 3Questions: 1Answers: 0

Hi,

I'm currently loading datatables with an ajax source with anything between 100 - ~ 10,000 rows returned as a basic json response. JSON is returned in a very basic format and I make use of "render" to display the response accordingly in a user friendly manner and for filtering/searching I use the raw JSON data.

For usability, i'd like datatables to load, say the first 5 records from DOM and the remainder from the datatables ajax request. The first 5 DOM elements will be outputted to the page already in the user friendly display (I guess you could call this the same as my "render" format ....).

I have been reading about Defer Loading function, however, this looks to be Server side only, which mine is not. Even if I could use this function. How would you integrate the first 5 elements whilst ensuring they could be included and contain the necessary data for filtering/searching etc?

I have complete control over how the first 5 are outputted to the page so I was originally thinking of making use of html 5 data attributes for the filter data but am at a complete loss as to how this would work with datatables.....

Really appreciate if you could help on this one - please let me know if I need to provide more info.

Thanks.

This discussion has been closed.