Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






More than 100 rows!

UserPost

15:19
25/03/2009


coolkay

Member

posts 10

Hi – How can I get more than 100 rows to show up in my jqGrid? I'm using JSON data and the file has more than 100 rows but nothing shows up. On the other hand if I limit it to 100 rows all the rows show in grid.


Thanks

Abel

02:48
26/03/2009


tony

Sofia, Bulgaria

Moderator

posts 7010

Hello,

Check your rowNum parameter in jqGrid. Also check if your server return the correct data.

Regards

Tony

07:53
26/03/2009


coolkay

Member

posts 10

tony said:

Hello,

Check your rowNum parameter in jqGrid. Also check if your server return the correct data.

Regards

Tony


Hi

Great control!

Actually, i do have it set to 1000 and the server is sending 1000 rows of data. I included some details. Let me know if you need more!

jQuery("#list2″).jqGrid({
    url:'/iBatisPlay/experimental/data.json?nd='+new Date().getTime(),

    datatype: 'json',

        jsonReader : {
          root: "rows",
          page: "page",
          total: "total",
          records: "records",
          repeatitems: true,
          cell: "cell",
          id: "id",
          userdata: "userdata",
          subgrid: {root:"rows",
            repeatitems: true,
            cell:"cell"
          }
        },  
       
    colNames:['#','Contact Name','Last Name','First Name','Company','Phone','Address','Email'],  

    colModel:[
        {name:'ID',index:'ID',width:50,sorttype:"float"},
        {name:'ContactName',index:'ContactName',width:125, editable: true},
     {name:'lastname',index:'lastname', width:75},
        {name:'firstname',index:'firstname', width:75},
        {name:'company',index:'company', width:125},
        {name:'phone',index:'phone', width:125},
        {name:'address',index:'address', width:250},
        {name:'email',index:'email', width:125}
    ],
   
    pager: jQuery('#pager2'),

    rowNum:1000,
   
    imgpath: '/ibatisplay/experimental/images',

    sortname: 'id',

    viewrecords: true,
   
    sortorder: 'desc',
   
    caption: 'Contacts DEMO',
   
    loadonce: true,
   
    loadtext: "Loading contacts…",
   
    multiselect: true,   
   
    multiboxonly: true,
   
    toolbar: [true,"top"],
   
    height: "50%"
});
});

Snippet of Data

{total: 11,

page: 1,

records: 1000,

rows: [

{id: '14835', cell:['1','','','','Knoll Showroom','416-365-3000 (Office Direct)','109 Atlantic Avenue Suit 200 -- Toronto -- ON -- -- M6K 1X4','']}

,{id: '14762', cell:['2','(Akan) Bowyer, Sheila','(Akan) Bowyer','Sheila','RBC Dexia Investor Services Trust','416-955-3514 (Office Direct)','200 Bay Street, 24th Floor -- Toronto -- ON -- Canada -- M5J 2J5','sheila.bowyer@rbcdexia-is.com']}

,{id: '14859', cell:['3','007, Contact','007','Contact','','','','']}


,{id: '792', cell:['998','Bezalel, Aharon','Bezalel','Aharon','','0119-722-641-1455 (Office General)','Mevo Hashar 3 Ein-Kerem -- Jerusalem 95-744 -- Israel','rachelfr@zahav.net.il']}

,{id: '1917', cell:['999','Bhardwaj, Rahul','Bhardwaj','Rahul','The AGO Foundation','905-474-9974 (Office General)','United Way York Region 80F Centurian Drive Suite 200 -- Markham -- ON -- Canada -- L3R 8C1','rbhardwaj@uwyr.on.ca']}

,{id: '793', cell:['1000','Bhargava, Paras','Bhargava','Paras','BMO Nesbitt Burns','416-359-6941 (Office Direct)','1 First Canadian Place 100 King Street West P. O. Box 150 -- Toronto -- ON -- Canada -- M5X 1H3','']}

]}



Thank you

Abel

11:12
13/04/2009


Clement

Member

posts 48

Hi,

Any solution? I face similar issue where I can set rowNum above 15. When I set rowNum to 20, the xml response has 20 rows but the grid is empty.

Changing rowNum back to 15 loads the grid. What have I missed?

Thanks!

11:27
13/04/2009


coolkay

Member

posts 10

My problem was that the data was NOT formatted correctly. I added one row at a time (15, 16, 17 etc…) to discover the individual column data was the problem.

20:47
13/04/2009


Clement

Member

posts 48

I have solved mine too.. Not sure why I had to move the line setting response content type above the xml data generation loop. I used to have it at the end of the page after the the data get generated in xml format.

Thanks!


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

32 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9596

Posts: 28792

Membership:

There are 10193 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7010 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information