Forum
16:31
13/12/2011
Hi Tony,
I'm using v. 3.7 with mvc 2.0 and I have the same problem,
I tried your solution, the pager works.
but when sorting, nothing happens!
this is my code, can u tell me why does'nt it work?
$(document).ready(function() {
$("#grid").jqGrid({
url: "Delivery.mvc/RenderList?SeachP.fromDate=12/27/2011 00:00:00&SeachP.toDate=01/04/2012 00:00:00&SeachP.CustomerRecid=3&SeachP.SubCustomerRecid=3&SeachP.Type=1",
mtype: "get",
datatype: "json",
colNames: ["ID","#","Status"],
colModel: [{ name: "ID", index: "ID", width: 50, align: "center", classes: "", sortable: true, sorttype: "int", editable: true, edittype: 'text'},
{ name: "deliverynum", index: "deliverynum", width: 100, align: "center", classes: "", sortable: true, sorttype: "int", editable: true, edittype: 'text'},
{ name: "Status", index: "Status", width: 100, align: "center", classes: "", sortable: true, sorttype: "text", editable: true, edittype: 'text'}],
rowNum: 10,
beforeRequest: function ff(){_grid_beforeRequest('grid');},
beforeSelectRow: function fff(rowIndex,e){_grid_beforeSelectRow('grid',rowIndex);},
gridComplete: function f(){if (_isGridReady) {return;} else {_isGridReady=true;}onGridLoad()},
direction: "rtl",
loadComplete: function(){$("#grid").setGridParam({datatype:'local'});},
onPaging: function(){$("#grid").setGridParam({datatype:'json'});},
height: 354,
rowList: -1,
pager: "#gridPager",
sortable:true,
sortname: "ID",
sortorder: "asc",
autowidth: false,
onSelectRow: function(id){rowSelected($("#grid").getRowData(id));},
ondblClickRow: function(rowId, iRow, iCol, e) { dblClick (rowId,iRow,iCol,e); },
caption: ""}); });
$("#grid").bind("keydown", on_grid_keydown);
Thanks!
Most Users Ever Online: 715
Currently Online:
28 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