1
Help for ParamQuery Grid (free version) / Date note showing
« on: March 09, 2017, 09:07:55 pm »
I am having issue getting date to actually show up at all. I get /Date(14300000000)/ and is continues in every sell.
var obj = {
width: "100%",
height: 400,
editable: false,
//columnBorders: false,
resizable: true,
title: "Systems",
showBottom: true,
// maxColWidth: '50%',
scrollModel: { autoFit: true },
// flexHeight: true
showTop: true,
selectionModel: { type: 'cell' },
pageModel: { type: "local", rPP: 20 },
filterModel: { on: true, mode: "AND", header: true },
numberCell: { show: false },
showHeader: true,
};
obj.columnTemplate = { minWidth: '10%', maxWidth: '80%' };
obj.colModel = [
{ title: "Acronym", width: 10, dataIndx: "Acronym",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "Acronym",
labelIndx: "Acronym",
listeners: ['change']
}
},
{ title: "Service", width: 10, dataIndx: "Service",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "Service",
labelIndx: "Service",
listeners: ['Change']
}
},
{ title: "Accrediation Status", width: 10, dataIndx: "AccrediationStatus",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "AccrediationStatus",
labelIndx: "Accrediation Status",
listeners: ['Change']
}
},
{ title: "IARecord Type", width: 10, dataIndx: "IARecordType",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "IARecord Type",
labelIndx: "IARecordType",
listeners: ['Change']
}
},
{ title: "Accreditation Date", width: 10, dataIndx: "AccreditationDate",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "Accreditation Date",
labelIndx: "AccreditationDate",
listeners: ['Change']
}
},
{ title: "ATD", width: 10, dataType: "date", dataIndx: "ATD",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "ATD",
labelIndx: "ATD",
listeners: ['Change']
}
}];
getListItems(webUrl,listName);
function checkFlag() {
if(dataDone == false) {
window.setTimeout(checkFlag, 100); /* this checks the flag every 100 milliseconds*/
} else {
obj.dataModel = {
location: "local",
sorting: "local",
sortIndx: "Acronym",
sortDir: "up",
dataType: "JSON",
data: myData
};
// console.log(obj.dataModel);
var $grid = $("#MyCoolGrid").pqGrid(obj);
}
}
$(document).ready(function() {
checkFlag();
});
</script>
var obj = {
width: "100%",
height: 400,
editable: false,
//columnBorders: false,
resizable: true,
title: "Systems",
showBottom: true,
// maxColWidth: '50%',
scrollModel: { autoFit: true },
// flexHeight: true
showTop: true,
selectionModel: { type: 'cell' },
pageModel: { type: "local", rPP: 20 },
filterModel: { on: true, mode: "AND", header: true },
numberCell: { show: false },
showHeader: true,
};
obj.columnTemplate = { minWidth: '10%', maxWidth: '80%' };
obj.colModel = [
{ title: "Acronym", width: 10, dataIndx: "Acronym",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "Acronym",
labelIndx: "Acronym",
listeners: ['change']
}
},
{ title: "Service", width: 10, dataIndx: "Service",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "Service",
labelIndx: "Service",
listeners: ['Change']
}
},
{ title: "Accrediation Status", width: 10, dataIndx: "AccrediationStatus",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "AccrediationStatus",
labelIndx: "Accrediation Status",
listeners: ['Change']
}
},
{ title: "IARecord Type", width: 10, dataIndx: "IARecordType",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "IARecord Type",
labelIndx: "IARecordType",
listeners: ['Change']
}
},
{ title: "Accreditation Date", width: 10, dataIndx: "AccreditationDate",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "Accreditation Date",
labelIndx: "AccreditationDate",
listeners: ['Change']
}
},
{ title: "ATD", width: 10, dataType: "date", dataIndx: "ATD",
filter: { type: "select",
condition: 'equal',
prepend: { '': '--Select--' },
valueIndx: "ATD",
labelIndx: "ATD",
listeners: ['Change']
}
}];
getListItems(webUrl,listName);
function checkFlag() {
if(dataDone == false) {
window.setTimeout(checkFlag, 100); /* this checks the flag every 100 milliseconds*/
} else {
obj.dataModel = {
location: "local",
sorting: "local",
sortIndx: "Acronym",
sortDir: "up",
dataType: "JSON",
data: myData
};
// console.log(obj.dataModel);
var $grid = $("#MyCoolGrid").pqGrid(obj);
}
}
$(document).ready(function() {
checkFlag();
});
</script>