[progress Communities] [progress Openedge Abl] Forum Post: Re: Retrieve A List- From The...

  • Thread starter Thread starter Vimalkumar Selvaraj
  • Start date Start date
Status
Not open for further replies.
V

Vimalkumar Selvaraj

Guest
Hi Shira, I am sorry it's too much code to understand entire stuff with out actual data, but found few things which may be causing issue for you First thing I noticed is your Datasource Schema mode seems to be incorrect, it should be like this. dataSourceOptions = { type: 'jsdo', transport: {}, schema: { model: { fields: { 'dueDate': { type: 'date', defaultValue: '' }, } } }, serverFiltering: true, serverSorting: true, serverPaging: true, pageSize: 50 } Second issue i can sense is, you are populating your DataSources on call back of loadCatalogs() promise, so ideally you can move merging Datasources to separate method and call that method only when both first and second datasources are populated. Say for an example something below function mergeDataSources(dataSource1,dataSource2){ dataSource1.fetch(function (){ var data1 = dataSource1.data(); dataSource2.fetch(function(){ var data2 = dataSource2.data(); var mergedData = data1.toJSON().concat(data2.toJSON()); var newDataSource = new kendo.data.DataSource({ data: mergedData, sort: { field: 'dueDate', dir: 'asc' }, schema: { model: { fields: { dueDate: { type: 'date' }, } } } }); newDataSource.fetch(function () { var rec = newDataSource.view(); alert(rec[0].dueDate) }); }) }); } Hope this helps, Thanks, Vimal

Continue reading...
 
Status
Not open for further replies.
Back
Top