Forum


21:04

19/03/2011

Hello Tony & community
Thanks for this awesome grid. a perfect fit between slickgrid and extJs. slim and very versatile, love it.
I am playing arround with multiple grids on 1 page which works fine if i give unique id's for the #grid and the #pager.
Facts:
- Everything Works in Internet Explorer perfectly
- Anything works in Firefox except pagination
- i wrote a php script to load the both grids dynamically with variables
- the data from the sql-database is loaded correctly with unique id's
- the tables, grid-name and pager-name are all unique
Problem:
- In firefox the pagination does not appear correctly ->pic 1
- If i load the second grid's jquery with setTimeout(function() {....},1) ->pic2 , than the pagination appears correctly But the second page than does not set the "first"-pagination button to enabled ->pic3.
HELP ON:
hint me what to look for.
normal load: does not show ...from(von) x.... pagination of 2nd grid not clickable
[Image Can Not Be Found]
with timeout: 2nd grids pagination getting loaded correctly
[Image Can Not Be Found]
with timeout 2nd page: backwards not possible on 2nd grid.
[Image Can Not Be Found]
Please help with a short hint what have i to look for.
12:45

10/08/2009

Hello,
I am sure that it is the jqGrid bug. The problem is that in the pager jqGrid use currently non-unique ids like "first", "prev", "next" and "last". I posted here the corresponding fix of the problem.
Best regards
Oleg
18:35

19/03/2011

Hi Oleg
Thanks for your response! Very glad about your post.
Yes i thought also about that but then i thought maybe the browser should walk the dom (coming from different trees (id of grid)) and resolve correctly. But your posted fix resolves the issue, so you got the problem at the root.
Maybe tony will implement that in a future upgrade so that we have also a minified version of it.
Thanks
bytheway;
Something strange i discovered is if i create the 2 grids with plain html it will not conflict but if i create them dynamically only then it conflicts. Part of my script is as follows:
setTimeout(function() {
jQuery("#<?php echo $grid_name;?>").jqGrid({
url:'modul/modul_jqgrid/ex_get3.php?tb=<?php echo $tb;?>',
datatype: 'xml',
mytype:'POST',
colNames:[<?php echo $col_names;?>],
colModel :[
<?php echo $col_models;?>
],
pager: '#<?php echo $toolbar_name;?>',
rowNum:<?php echo $row_num;?>,
rowList:[<?php echo $row_list;?>],
sortname: '<?php echo $sort_name;?>',
sortorder: '<?php echo $sort_order;?>',
height: "<?php echo $height;?>",
viewrecords: true,
altRows : true,
caption: '<?php echo $grid_title;?>',
editurl:"modul/modul_jqgrid/ex_edit3.php?tb=<?php echo $tb;?>"<?php if (!empty($add)){ echo ",n";}?>
<?php if (!empty($add)){ echo $add;}?>
});
jQuery("#<?php echo $grid_name;?>").jqGrid('navGrid','#<?php echo $toolbar_name;?>',
<?php echo $usertypevar;?> // {edit:true,add:true,del:true,search:true}, //options
{height:480,reloadAfterSubmit:true,closeAfterEdit:true}, // edit options
{height:480,reloadAfterSubmit:true,closeAfterAdd:true}, // add options
{}, // del options
{closeAfterSearch:true} // search options
);
<?php echo $add_outer;?>
}, <?php echo $timeout;?>)
});
<?php echo $add_outside;?>
<div id="<?php echo $toolbar_name;?>"></div>
The output from the html in firebug, even the $_GET in the network-tab are all the same like in the plain html 2-grid example.
Maybe the response from the grid at loading the $_GET ( the rows, number, cols, …) can't identify in some browsers (firefox) the target correctly. It has to be like this and your fix solved it.
I wrote that for the people who are trying to do the multi grids to reproduce the error, saying them that it mainly appears with dynamically produced grids (php variables) … at least based on my experience.
Best regards and thanks for responses and help … maybe tony will let us know his guesses about the issue too
Thanks Oleg
Regards,
Gerry
Most Users Ever Online: 715
Currently Online:
73 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66