With respect to ListGrid#ResultSet, Is there anyway i can add new records to the existing cache at a specific index without dropping the existing cache ?
I searched forms and got the following code, however with this code the new data from server is replacing the existing cache.
I searched forms and got the following code, however with this code the new data from server is replacing the existing cache.
Code:
fetchData(request.getCriteria(), new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData, DSRequest req) {
DSResponse res = new DSResponse();
Record[] records = response.getData();
for(int i=0;i<records.length;i++){
Record[] recs = new Record[1];
recs[0]=records[i];
res.setData(recs);
res.setTotalRows(6000);
DSRequest request = new DSRequest();
request.setOperationType(DSOperationType.ADD);
updateCaches(res,request);
}
}
});