Forum

July 12th, 2025
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
"pager" don't work
21/04/2010
17:50
Avatar
lbottoni
New Member
Members
Forum Posts: 1
Member Since:
21/04/2010
sp_UserOfflineSmall Offline

why don't work the "pager"?

 <script type="text/javascript">
$(function ()
{
$("#gbl").jqGrid(
{
datatype: "clientSide",
height: 'auto',
colNames:['Numero','Data scadenza', 'Tipo'],
colModel:[
{name:'phone',index:'phone', width:200, sorttype:"int"},
{name:'expireds',index:'expireds', width:200,sorttype:'text'},
{name:'typebl',index:'typebl', width:100, sorttype:"text"}
],
multiselect: false,
caption: "Black List",
rowNum:10,
pager: "#pager9"
});

var mydata = [
{phone:"00390104310990", expireds:"24-04-2010", typebl:"Static"},
{phone:"00390104310991", expireds:"08-04-2010", typebl:"Static"},
{phone:"00390104310992", expireds:"16-08-2010", typebl:"Static"},
{phone:"00390104310993", expireds:"16-01-2010", typebl:"Dynamic"},
{phone:"00390104310994", expireds:"08-06-2010", typebl:"Dynamic"},
{phone:"00390104310995", expireds:"22-05-2010", typebl:"Dynamic"},
{phone:"00390104310996", expireds:"29-05-2010", typebl:"Dynamic"},
{phone:"00390104310997", expireds:"07-12-2010", typebl:"Static"},
{phone:"00390104310998", expireds:"18-09-2010", typebl:"Static"},
{phone:"00390104310999", expireds:"13-02-2010", typebl:"Static"},
{phone:"003901043109910", expireds:"05-11-2010", typebl:"Static"},
{phone:"003901043109911", expireds:"31-02-2010", typebl:"Dynamic"},
{phone:"003901043109912", expireds:"26-08-2010", typebl:"Static"},
{phone:"003901043109913", expireds:"20-02-2010", typebl:"Static"},
{phone:"003901043109914", expireds:"28-05-2010", typebl:"Dynamic"},
{phone:"003901043109915", expireds:"06-01-2010", typebl:"Static"},
{phone:"003901043109916", expireds:"19-01-2010", typebl:"Dynamic"},
{phone:"003901043109917", expireds:"03-03-2010", typebl:"Dynamic"},
{phone:"003901043109918", expireds:"25-10-2010", typebl:"Static"},
{phone:"003901043109919", expireds:"23-02-2010", typebl:"Static"},
{phone:"003901043109920", expireds:"12-04-2010", typebl:"Static"},
{phone:"003901043109921", expireds:"11-04-2010", typebl:"Static"},
{phone:"003901043109922", expireds:"19-02-2010", typebl:"Dynamic"},
{phone:"003901043109923", expireds:"15-10-2010", typebl:"Static"},
{phone:"003901043109924", expireds:"12-08-2010", typebl:"Static"},
{phone:"003901043109925", expireds:"23-11-2010", typebl:"Static"},
{phone:"003901043109926", expireds:"12-06-2010", typebl:"Static"},
{phone:"003901043109927", expireds:"15-07-2010", typebl:"Dynamic"},
{phone:"003901043109928", expireds:"15-04-2010", typebl:"Static"},
{phone:"003901043109929", expireds:"05-01-2010", typebl:"Dynamic"},
{phone:"003901043109930", expireds:"30-06-2010", typebl:"Dynamic"},
{phone:"003901043109931", expireds:"20-10-2010", typebl:"Static"},
{phone:"003901043109932", expireds:"13-05-2010", typebl:"Static"},
{phone:"003901043109933", expireds:"26-10-2010", typebl:"Static"},
{phone:"003901043109934", expireds:"11-03-2010", typebl:"Dynamic"},
{phone:"003901043109935", expireds:"08-11-2010", typebl:"Dynamic"}
];
for(var i=0;i<=mydata.length;i++)
$("#gbl").jqGrid('addRowData',i+1,mydata[i]);
});

</script>

<body>
  <table id="gbl"></table>
<div id="pager9"></div>

</body>

error
--------------------
b.jgrid.formatter is undefined
Cry

26/04/2010
13:34
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Currently the pager does not work with local data. It will be in 3.7 releae

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.

29/08/2010
23:17
Avatar
stipko
Member
Members
Forum Posts: 4
Member Since:
29/08/2010
sp_UserOfflineSmall Offline

I am using jqGrid  3.7.2 and get same error "b.jgrid.formatter is undefined" . Does pager work in this version at all? 

now, this is embarrassing. I forgot to include lang.js file ... it works

30/08/2010
01:17
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

First of all you should verify that you included grid.locale-en.js before jquery.jqGrid.min.js.

Compare your problem with the problem described in http://stackoverflow.com/quest.....10#3495210.
Look at http://www.ok-soft-gmbh.com/jq.....tm as a working example.

To have correct sorting in your grid look at /blog/?page_id=393/help/client-side-date-sorting-is-not-working/ and the example
http://www.ok-soft-gmbh.com/jq.....avient.htm. I'll recommend you define datefmt:"d-m-Y"
and sorttype:"date" for the 'expireds' column.

By the way, the line

    for(var i=0;i<=mydata.length;i++)

would be also replace to

    for(var i=0;i<mydata.length;i++)

Best regards
Oleg

P.S. @Tony. I would you recommend to include alert() message in grid.base.js is case
if somebody try use it without including of any grid.locale-XX.js file. Such message
can be more understandable as the error message like "b.jgrid.formatter is undefined".

01/09/2010
17:51
Avatar
stipko
Member
Members
Forum Posts: 4
Member Since:
29/08/2010
sp_UserOfflineSmall Offline

P.S. @Tony. I would you recommend to include alert() message in grid.base.js is case
if somebody try use it without including of any grid.locale-XX.js file. Such message
can be more understandable as the error message like "b.jgrid.formatter is undefined".


now, that will be polite Laugh

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
35 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