Paging customization when there is no total records count

Paging customization when there is no total records count

fkorlingfkorling Posts: 1Questions: 0Answers: 0
edited September 2010 in General
Hi,

I'm looking to replace a our home cooked data tables implementation with DataTables, but have
an issue that we need to solve. As we can have very large result sets, it will be a server side
backed table, where the server handles filtering, sorting and pagination. The presented
table should have a four button setup, where you can move to First, Next, Previous and Last
pages. I've seen the four button plugin to change the display to contains those 4 buttons.

Now the problem with DataTables integration:

We have a service layer that returns result pages from a database. Apart from the data,
the response includes two booleans:

* is there page prior to the returned page ?
* is there a page after the returned page?

What we don't get back, however, is a total records count, which the current server side code assumes,
i.e., the iTotalRecords return value. The expected behaviour of the pagnination buttons in the table should
be that First/Last are always enabled. Wheter Next/Prev are enabled should depende on the
return booleans in the result set?

What would be a good way to integrate our service layer with DataTables? Could it be handled by a plugin
or would it require additional changes?

Thanks,

Filip
This discussion has been closed.