Forum


04:44

02/01/2009

Hello,
I would imagine that clicking on a column header that is set for sortable:true should toggle the sort order from asc to desc for that column and include it in the POST "sord" parameter when the grid is reloaded from the server.
In this case, the POST is made when the column header is clicked but the "sord" parameter does not change from Asc to desc.
Is there something else that needs to be done to activate this feature?
Rob..
06:32

Moderators
30/10/2007

Hello,
I'm not sure what you try to do but this work well in the demo page. You can check. Also do you have some events defind - by example onPaging.
Also if you click on column1 and then on column2 the first order is asc and the second is again asc
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.
07:33

02/01/2009

Hi Tony,
The following is how the grid is configured: (truncated as much as possible)
(”#ETSMonth”).jqGrid({
url: 'WSGridGetDFSA.aspx',
datatype: “json”,
mtype: 'POST',
colModel: [
{label: 'Date', name: 'Day', index: 'DayDate', width: 50, align: 'center' },
{label: 'UWI', name: 'UWI', index: 'UWI', width: 200 },
...........40 other columns.........
{label: 'GRID', name: 'GRID', index: 'GRID', width: 1}
],
imgpath: 'themes/coffee/images',
sortname: 'Day',
sortorder: “Asc”,
viewrecords: true,
height: '100%',
hidegrid: false,
cellEdit: true,
cellsubmit: 'clientArray',
cellurl: “WSGridSetDFSA.aspx”,
afterSaveCell: function(rowid, celname, value, iRow, iCol) {
setAssociatedCellValues(rowid, celname, value, iRow, iCol) },
onSelectCell: function(id, name, val, iRow, iCol) {
setStaticCellValues(id, name, val, iRow, iCol); },
loadComplete: function() { setInitialCaption(); },
subGrid: true,
subGridRowExpanded: function(subgrid_id, row_id) {….Working grid as subgrid…},
caption: “Title bar caption”
}); //End #ETSMonth
09:21

Moderators
30/10/2007

Hello,
Try with
sortorder: "asc"
and not with
sortorder: “Asc”
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.
Most Users Ever Online: 715
Currently Online:
45 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