Hello,
I have the following custom dataType in order to provide custom sorting on date fields using special date format:
var pqcolmodel=[
{dataIndx: 'col1', title: ' ', width: '5px', align: 'center', copy: true, minWidth: 30},
{dataIndx: 'col2', title: 'issued', width: '80px', align: 'right', dataType: function (val1, val2) {return compareDate(val1, val2);}, copy: true, minWidth: 30}
];
function compareDate() returns -1, 0, 1 depending on val1 and val2.
this is datamodel:
var pqdatamodel={
location: 'local',
data: pqdata1,
sorting: 'local',
sortIndx: ['col13'],
sortDir: ['down']
}
But it seems the custom sorting is never called.
Even this code returns "undefined".
//getter
var colM = $( "#grid_md" ).pqGrid( "option", "colModel" );
var dataType = colM[1].dataType;
console.debug(dataType);
What do I do wrong?
Thanks,
Jan