Forum



06:22

20/05/2010

I need do multiple sorting, but the jqgrid not show me the icons of the sort direction for each column. What is wrong in this code?
jQuery(document).ready(function() {
$("#grid").jqGrid(
{
datatype: function() {
$.ajax(
{
url: "OrdenDeProduccion.aspx/GetOrdenDeProduccion", //PageMethod
data: "{'pPageSize':'" + $('#grid').getGridParam("rowNum") +
"','pCurrentPage':'" + $('#grid').getGridParam("page") +
"','pSortColumn':'" + $('#grid').getGridParam("sortname") +
"','pSortOrder':'" + $('#grid').getGridParam("sortorder") + "'}", //PageMethod Parametros de entrada
dataType: "json",
type: "post",
contentType: "application/json; charset=utf-8",
complete: function(jsondata, stat) {
if (stat == "success")
jQuery("#grid")[0].addJSONData(JSON.parse(jsondata.responseText).d);
else
alert("Error al traer los datos desde json");
}
});
},
jsonReader: //Set the jsonReader to the JQGridJSonResponse squema to bind the data.
{
root: "Items",
page: "CurrentPage",
total: "PageCount",
records: "RecordCount",
repeatitems: true,
cell: "Row",
id: "Id"
},
colModel: //Columns
[
{ index: 'Id', name: 'Id', width: 10, align: 'Left', label: 'Id', hidden: true },
{ index: 'Horaentrada', name: 'Horaentrada', align: 'Center', label: 'Hora', width: 200, sortable: false },
{ index: 'Producto', name: 'Producto', align: 'Center', label: 'Producto', width:200 },
{ index: 'Cantidad', name: 'Cantidad', align: 'Center', label: 'Cantidad', width: 200, sorttype: 'int' },
{ index: 'Precio', name: 'Precio', align: 'Center', label: 'Precio', width: 200, sorttype: 'float' },
],
caption: "Tabla Orden de Produccion",
loadtext: 'Cargando datos...',
emptyrecords: 'No hay resultados',
rowNum: 10, // PageSize.
rownumbers: true,
rownumWidth: 40,
gridview: true,
pager: "#pager", //Pager
viewrecords: true,
//sortname: "Cantidad",
sortorder: "asc", //Default SortOrder.
viewsortcols: true,
width: "760",
height: "260"
}).navGrid("#pager", "#grid", { edit: false, add: false, search: true, del: false });
});
Thanks,
Regards!
18:36

Moderators
30/10/2007

Hello,
Nothing is wrong. Currently we do not support multiple sorting. That mean if you have constructed your own instead of this only one sort icon will be active
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.
18:11

Moderators
30/10/2007

Hello,
Not sure if this will be available soon.
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:
51 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