var data= [{
“id”: “17”,
“text”: “13g protein”,
“parentid”: “13”
}, {
“id”: “14”,
“text”: “Caffe Vanilla Frappuccino Light”,
“parentid”: “12”
}];
// prepare the data
var source =
{
datatype: “json”,
datafields: [
{ name: ‘id’ },
{ name: ‘parentid’ },
{ name: ‘text’ }
],
id: ‘id’,
localdata: data
};
// create data adapter.
var dataAdapter = new $.jqx.dataAdapter(source ,
beforeLoadComplete: function () {
// get data records.
var records = dataAdapter.records;
var length = records.length;
}
);
Encountering with the unidentified object when i am accessing the data adapter with in the beforeLoadcomplete event in above mentioned example .
Could you please suggest how to access the adapter with in the beforeLoadComplete event in above mentioned case .