Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
cliendSide Data (Array or XML-String) -> pager problems
12/05/2009
07:21
Avatar
AKS
Member
Members
Forum Posts: 5
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

Hi all,

i have to use a cliendSide Array or XML-String to fill the grid.

my code:
<table id="list" class="scroll"></table>
<div id="pager" class="scroll" style="text-align:center;"></div>

<script type="text/javascript">
var mystr ="<?xml version='1.0' encoding='utf-8'?><invoices><rows>"
+"<row>"
+"<cell>data1</cell>"
+"</row>"
+"<row>"
+"<cell>data2</cell>"
+"</row>"
+"<row>"
+"<cell>data3</cell>"
+"</row>"
+"<row>"
+"<cell>data4</cell>"
+"</row>"
+"<row>"
+"<cell>data5</cell>"
+"</row>"
+"<row>"
+"<cell>data6</cell>"
+"</row>"
+"<row>"
+"<cell>data7</cell>"
+"</row>"
+"<row>"
+"<cell>data8</cell>"
+"</row>"
+"<row>"
+"<cell>data9</cell>"
+"</row>"
+"<row>"
+"<cell>data10</cell>"
+"</row>"
+"<row>"
+"<cell>data11</cell>"
+"</row>"
+"</rows>"
+"</invoices>";

jQuery(document).ready(function(){
  jQuery("#list").jqGrid({
    datatype: 'xmlstring',
    datastr : mystr,
    width:300,
    colNames:['Inv No'],
    colModel :[
      {name:'invid', index:'invid', width:55, sorttype:'int'} ],
    pager: jQuery('#pager'),
    rowNum:10,
    rowList:[10,20,30],
    viewrecords: true,
    imgpath: gridimgpath,
    caption: 'My first grid'
  });
});

</script>

Image Enlarger

At the image you can see my problem. I have 11 records in my grid, the "rowNum" == "10" and everything is on one page. can you give me a solution how i can work with the pager and a "clientSide" datastore.

greets

arne

12/05/2009
07:23
Avatar
AKS
Member
Members
Forum Posts: 5
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

on my version with a clientSide array the "Row(s)" are counted correctly. But also very data on one page.

15/05/2009
02:28
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Humm, you are right. The problem is that grid expect 10 (or less than 10) rows from server. When we deal with xml,json  and strings this is not checked. I need to revise this and check the code. Should apply the fix carefully.

Thanks

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
64 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information