It turns out that jqGrid treats a column data as text by default - but you can set it to int or integer to get correct integer sorting
So set sorttype: "integer" in your colModel options
colModel: [{
name: 'ID',
index: 'ID',
sorttype: "int",
width: 12
},
name: 'ID',
index: 'ID',
sorttype: "int",
width: 12
},
And you will get correct sorting for your numerical columns
More on colModel options here
No comments:
Post a Comment