I am using jqGrid in MVC 4 to display data. I am having a grids with date/ datetime column in it. I am returning C# DateTime
variable data for grid date column; which is displaying fine with the formatoption: {srcformat: 'm/d/Y', newformat: 'm/d/Y'}
for date column & formatoption: {srcformat: 'm/d/Y h:i:s', newformat: 'm/d/Y h:i:s A'}
for datetime column. but the sorting of this column does not reflect when user clicks column header.
here is the colModel
for date column
{
name: 'TestOrderDate', index: 'TestOrderDate', formatter: 'date',
sorttype: 'date', width: 90, align: 'center', fixed: true,
formatoptions: { srcformat: 'm/d/Y', newformat: 'm/d/Y' }
},
& for datetime column
{
name: 'TestOrderDate', index: 'TestOrderDate', formatter: 'date',
sorttype: 'date', width: 90, align: 'center', fixed: true,
formatoptions: { srcformat: 'm/d/Y h:i:s', newformat: 'm/d/Y h:i:s A' }
},
Can anybody tell me what is wrong in colModel
due to which sort behavior not working.