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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:22:44+00:00 2026-05-20T13:22:44+00:00

I have problem with loading my jqGrid. It just loads two parallel lines, and

  • 0

I have problem with loading my jqGrid. It just loads two parallel lines, and shows “Loading…” above them.
This is my controller:

function grid()
{
    $var['grid'] = $this->Uom_model->select();
         $i = 0;
         foreach($var['grid'] as $row) 
         {
            $response->rows[$i]['id']=$row->id;
            $response->rows[$i]['cell']=array($row->id,$row->uname);
            $i++;
         }
   echo json_encode($response);


}

This is my View:

$(document).ready(function() { 

    jQuery("#list27").jqGrid({
           url:'<?php echo base_url();?>index.php/uom/grid',
           datatype: "json",
           mtype: "post",
           height: 250,
           width: 450,
           colNames:['ID','Unit of Measure'],
           colModel:[
                  {name:'id',index:'id', width:65},
                  {name:'uname',index:'uname'}
              ],
           rowNum:50,
           rowTotal: 2000,
           rowList : [20,30,50],
           loadonce:true,
           rownumbers: true,
           rownumWidth: 40,
           gridview: true,
           pager: '#pager27',
           viewrecords: true,
           sortorder: "asc",
           caption: "Loading data from server at once"    
       });
}); 

The JSON output if I run only the function “grid” from the controller is:

{"rows":[{"id":"1","cell":["1","grams"]},{"id":"2","cell":["2","hour"]},{"id":"3","cell":["3","kilo"]},{"id":"4","cell":["4","liter"]},{"id":"5","cell":["5","pcs"]}]}

Thank you in advance.

  • 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-20T13:22:44+00:00Added an answer on May 20, 2026 at 1:22 pm

    I could not reproduce your problem, but the grid from my test (see here) have wrong row numbers. Using jsonReader

    jsonReader: {
        page: function (obj) { return 1; },
        total: function (obj) { return 1; },
        records: function (obj) { return obj.rows.length; }
    }
    

    one can solve the problem: see here.

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

Sidebar

Related Questions

I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I have a problem using the Java search function in Eclipse on a particular
Greetings, I have a problem using jqgrid and jquery tab (I am coding in
I have problem with loading images from the Documents folder of iPhone application into
I have problem with loading resources for UserControl from referenced assembly in Expression Blend
I have have a problem loading and accessing data from a value object in
related Questions didn't help ! i have a problem loading php_curl.dll under following circumstances:
I have a problem with loading image with java 2ME. I have a image
I have problem in some JavaScript that I am writing where the Switch statement
I have problem with return statment >.< I want to store all magazine names

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.