Forum
14:25
03/07/2013
Hi guys!
Thank you for your plugin, it is awesome!
I've used the following configuration:
$.ajax({
type: "POST",
url: "table_columns",
dataType: "json",
data: { button: $('#button_val').val() },
success: function(result) {
var colN = result.colNames;
var colM = result.colModel;
$("#data_table").jqGrid({
url: 'data_table',
datatype: "json",
mtype: 'GET',
postData: { button: function() { return $('#button_val').val(); } },
scroll: 1,
hidegrid: false,
colNames: colN,
colModel: colM,
pager: '#data_table_navi',
sortname: 'id',
rowNum: 100,
rowList: [100, 200, 300],
viewrecords: true,
sortorder: "desc",
sortable: true,
height: $('.inner-middle-center').height() – 75,
rownumbers: true,
autowidth: true,
shrinkToFit: true,
caption:"Any table name",
loadError: function(xhr,status,error){ alert(status); }
})
},
error: function(x, e) {
alert(x.readyState + " "+ x.status +" "+ e.msg);
}
});setTimeout(function () { $("#data_table").jqGrid('setGridParam',{ datatype: 'json' }); }, 50);
scroll option sets to 1, but I need get an additional mechanizm to switch between pages.
I've tried to realize the following feature:
<button onClick="grid = $('#data_table'); grid.setGridParam({ page: $('#temp').val() }); grid.trigger('reloadGrid'); ">Test Button</button>
<input id='temp'></input>
But it works correctly only first once.
I'll be glad of any help, thanks.
Regards
Most Users Ever Online: 715
Currently Online:
43 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