I am defining jqxgrid inside a function like the following:
this.processID= function (collection_) {
// Populate the count
jQuery("#IDCount").html("(" + collection_.length + ")");
var source =
{
localdata: collection_,
datatype: "array"
};
var dataAdapter = new $.jqx.dataAdapter(source, {
loadComplete: function (data) { },
loadError: function (xhr, status, error) { }
});
$("#IDPanel").jqxGrid(
{
source: dataAdapter,
width: '1000',
columns: [
{ text: 'Location', datafield: 'Description' },
{ text: 'Type', datafield: 'IDTypeDescription' },
{ text: 'Start', datafield: 'startDate' },
{ text: 'End', datafield: 'endDate' },
{ text: 'ID ', datafield: '',width:150 },
{ text: 'Defined Attributes', datafield: '', width:150}
]
});
$("#IDPanel").jqxGrid({ height: 150 });
};
I am getting the following error in the console:

Question #1: How should I define unique datafield ? the above code was working on V2.7 but on v4.1.2, it’s giving me the error as shown above.
Question #2:Another question, why does j1x-all.js take lot of time to load if I try to open it?