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 6049309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:33:44+00:00 2026-05-23T07:33:44+00:00

I am using jqGrid . Pagination is not getting reflected, what could be the

  • 0

I am using jqGrid. Pagination is not getting reflected, what could be the problem? I checked in Firefox 4.1 and IE8, but does not show jqGrid at all on chrome.

var filesystem=[];
$(xml).find('file').each(function(){ 
    var row={};
    row.total=$(this).attr('total');
    row.free=$(this).attr('free');
    row.used=$(this).attr('used');
    row.percentage=$(this).attr('percentage');
    filesystem.push(row);
});


$('#detailTable').empty();
$('<div>')
.attr('id','diskUsageSpan')
.html('<div class="titleBlue">Configuration&gt;System&gt;Disk Usage</div>'+
        '<table id="list1"></table>'+
        '<div id="gridpager"></div>'+
     '</div>')        
.appendTo('#detailTable');    

Updated

jQuery("#list1").jqGrid({
    datatype: "clientSide",
    height: 250,
       colNames:['id','Total Space','Free Space', 'Used Space', 'Used Percentage'],
       colModel:[
           {name:'id',index:'id', width:90, align:"right"},
           {name:'total',index:'total', width:90, align:"right"},
           {name:'free',index:'free', width:90, align:"right"},
           {name:'used',index:'used', width:90, align:"right"},
           {name:'percentage',index:'percentage', width:120, align:"right"}
       ],
       pagination:true,
       pager : '#gridpager',
       rowNum:10,
    viewrecords: true,
    gridview: true,
    edit:false,
    add:false,
    del:false

});



for(var i=0;i<filesystem.length;i++)
    jQuery("#list1").jqGrid('addRowData',i+1,filesystem[i]);

jQuery("#list1").setGridParam({rowNum:10}).trigger("reloadGrid");
  • 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-05-23T07:33:45+00:00Added an answer on May 23, 2026 at 7:33 am

    The problem is that you should call reloadGrid after the addRowData sage and not before.

    The best way would be to use data parameter instead:

    var grid = jQuery("#list1");
    grid.jqGrid({
        datatype: "local",
        data: filesystem, // here!!!
        height: "auto", // it can be better if you don't need the fix hight
        colNames: ['Total Space','Free Space', 'Used Space', 'Used Percentage'],
        colModel: [
            {name:'total',index:'total', width:90, align:"right"},
            {name:'free',index:'free', width:90, align:"right"},
            {name:'used',index:'used', width:90, align:"right"},
            {name:'percentage',index:'percentage', width:120, align:"right"}
        ],
        pager : '#gridpager',
        rowNum:10,
        rowList:[10,20,30],
        viewrecords: true,
        gridview: true
    });
    grid.jqGrid('navGrid','#gridpager',{edit:false,add:false,del:false});
    

    No grid reloading is needed.

    If you fill row for filesystem I would recommend you include additional id property in the row which will be used as the rowid. The value of ids of all HTML elements used on the page must be unique.

    Instead of recreating of the div#detailTable contain like you do you can just call GridUnload (see here for an example). Are you really need recreate the grid and not just change the grid contain? To change the grid contain you can just set data parameter of jqGrid with respect of setGridParam and call .trigger("reloadGrid").

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

Sidebar

Related Questions

I am using jqgrid, it is currently working fine in FF, IE8, Chrome, Safari.
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I'm using jqGrid plugin and I want to add onKeyPress event to each field
I have just started using jqGrid , and I have some tables that I
I'm using jqGrid and adding my own onclick event to each cell of data
I am using jqGrid ( http://www.trirand.com/blog/ ) to display some read-only data. The resizeable
So I'm using jqGrid with my mvc.net / Ling2Sql prototype site that I'm making
I am using JQGrid component for displaying ajax tree grid. With some quantity of
Hi I'm using jqGrid and I'm wondering, how do I add jQueryUI's datepicker to
I'm using jqGrid for a table input and setting up the url as a

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.