Forum


22:37

22/08/2009

I'm using the jqgrid but I want to show it by clicking a button, I mean if a select some paramaters it change the content of the grid, I have used a button with a onclick event that call the jqgrid but the problem is that it just works in the first time, if I want to change some parameter and show the jqgrid again it doesn't update the content. There is some way I can reload the url where I get the data by clicking a button??
There is the code I'm using:
$(function() {
function showGrid()
{
jQuery("#informesTable").jqGrid({
url: 'showInfo.php',
datatype: 'json',
width:850,
height:'auto',
mtype: 'GET',
colNames: ['Id', xxx', 'xxx', 'xxx', 'xxx', 'xxx' , 'xxx' , 'xxx'],
colModel: [
{ name: 'Id', index: 'Id', width: 40,hidden:true, align: 'left', editable:false},
{ name: 'xxx', index: 'xxx', width: 120,align: 'left', editable:false},
{ name: 'xxx', index: 'xxx', width: 40,align: 'left', editable:false},
{ name: 'xxx',index:'xxx', width: 130,editable: false},
{ name: 'xxx',index:'xxx', width: 130,editable: false},
{ name: 'xxx',index:'xxx', width: 150,editable: false},
{ name: 'xxx',index:'xxx', width: 100,editable: false},
{ name: 'xxx',index:'xxx', width: 80,editable: false}
],
pager: jQuery('#pager'),
rowNum: 10,
rowList: [10, 15, 30, 50],
sortname: "ID",
sortorder: "desc",
loadonce: true,
multiselect: true,
viewrecords: true,
editurl: 'EditData.php',
imgpath: '/content/images',
caption: 'Infol'
});
jQuery("#pager").jqGrid('navGrid',"#pager",{edit:false,add:false,del:false});
}
$("#send").click(function(event){
showGrid();
});
});
Thanks in advance...
10:26

Moderators
30/10/2007

Hello,
Look here:
http://www.trirand.com/blog/?p.....s-and-json
You have the same problem
Reagrds
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.
Most Users Ever Online: 715
Currently Online:
57 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