Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8438697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:47:12+00:00 2026-06-10T07:47:12+00:00

I am using the jQuery plugin called DataTables and I would like to display

  • 0

I am using the jQuery plugin called DataTables and I would like to display a table, that is populated automatically from an Ajax source, that supports pagination. The problem is that, from the server, I only get 10 results out of all the results (the response also contains the total number of results). Therefore the pagination looks something like : showing 1 to 10 out of 10 results.

I want it to say : showing 1 to 10 out of X results, where X is the total number of results. I cannot use any server side processing. So my question is :

How can I configure the DataTables plugin, to use this type of pagination ?

For example something like :

jQuery(table).dataTable({
  "aoColumnDefs": [...],
  "bProcessing" : true,
  "sAjaxSource" : "...",
  "sAjaxDataProp" : "...",

  "sOffsetParam" : "offset",
  "sNumFoundParam" : "totalResults"
});

Once again, I am restricted on working only on the client-side.

I managed to find a partial response :

If I set the “bServerSide” flag to TRUE, the plugin will look inside the server response for the fields required to build the pagination system. However, the field names are still hardcoded, so I still need a way to use custom field names. Also, the offset is sent using the “sEcho” parameter (which indicates the number of the page that is required).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:47:13+00:00Added an answer on June 10, 2026 at 7:47 am

    As you can see here the server must return two paramters

    int – iTotalRecords – Total records, before filtering (i.e. the total
    number of records in the database) int – iTotalDisplayRecords – Total
    records, after filtering (i.e. the total number of records after
    filtering has been applied – not just the number of records being
    returned in this result set)

    if the server doesn’t return those parameters the client can’t know that it must draw the next / prev buttons

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im using a jQuery plugin called Textualizer and i would like to add data
I am using a jquery plugin from [ FilamentGroup ] called DateRangePicker. I have
I'm using the jQuery plugin that generates interactive tables called jqGrid . I want
I'm using the datatables JQuery plugin. I use it with AJAX and pagination (server-side).
I'm using a great jQuery content plugin called AnythingSlider . The problem is that
Using a Jquery plugin called filestyle from: http://www.appelsiini.net/projects/filestyle . I have a select box
I'm using a great jQuery plugin called GMaps3 to display a map on a
I'm using a jQuery plugin called Colorbox (http://colorpowered.com/colorbox/) and loading content via Ajax. This
I am using jQuery and a plugin called Galleriffic to display some images and
I am using a Jquery plugin called datatables Its fantastic, however I cannot get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.