我有一个 jqGrid。我的一些设置是:
url: '/Operations.aspx/GetData',
datatype: 'json',
mtype: 'POST',
loadonce: true,
multiSort: true,
sortname: 'PrimerApellido asc, SegundoApellido asc, Nombre',
sortorder: 'asc',
jsonReader: {
root: 'd.rows',
page: 'd.page',
total: 'd.total',
records: 'd.records',
id: 'Id',
repeatitems: false
},
我的 colModel 包括列 Nombre、PrimerApellido 和 SegundoApellido(按此顺序,并具有相同的名称和索引:列 Nombre 具有名称“Nombre”和索引“Nombre”)。我在 loadComplete 中设置 rowTotal
$this.jqGrid('setGridParam', { rowTotal: $this.jqGrid('getGridParam', 'records') });
网格正确显示数据,但是当我更改页面时,数据显示为按 Nombre、PrimerApellido、SegundoApellido 排序,我无法按我的设置排序:( 任何人都可以帮助我吗?