How can I sort my JqGrid according to the NumUnity column
Code:
$("#jqGrid").jqGrid({
url: URLTemario + id,
mtype: "GET",
datatype: "json",
colModel: [
{ label: 'Id', name: 'IdReg', key: true, width: 70, hidden: true },
{ label: 'IdMateria', name: 'IdMateria', width: '60', hidden: true },
{ label: 'Relacion', name: 'Relacion', width: '60', hidden: true },
{ label: 'Unidad', name: 'NumUnidad', width: '60' },
{ label: 'Tema', name: 'Descripcion', width: '300' }
],
sortname: 'IdReg',
loadonce: true,
height: 'auto',
rowNum: 10,
pager: "#jqGridPager",
width: '100%',
caption: "REGISTROS",
viewrecords: true,
});
In NumUnidad I receive a set of values such as:
NumUnity = 1, NumUnity = 2, NumUnity = 1.1 NumUnity = 1.2 NumUnity = 2.1
Then I want to sort them up in my table by NumUnity (Unit number of a subject or subject)