0

Is there an smartClient solution to update multiple?

saveAllEdits didn't send any update request to the server, updateData works on a single Record object, if I try to send an array it ends up at the server as

0:{
    name:"example",
    permission:"high"
},
1:{
    name:"test",
    permission:"low"
},
2:{
    name:"inquery",
    permisson:"low"
}

I need a solution that will send the request as

records:[
    {
        name:"example",
        permission:"high"
    },
    {
        name:"test",
        permission:"low"
    },
    {
        name:"inquery",
        permisson:"low"
    }
]
stackoverfloweth
  • 6,669
  • 5
  • 38
  • 69

1 Answers1

1

use queueing:

RPCManager.startQueue();
grid.updateData(record1);
grid.updateData(record2);
RPCManager.sendQueue();
claudiobosticco
  • 413
  • 2
  • 8
  • thanks @claudiobosticco, I can see that I'm going to be contributing to your SO score significantly – stackoverfloweth Nov 11 '15 at 20:28
  • actually it seems ***queueing*** only works for smart GWT. We're running against c# – stackoverfloweth Nov 11 '15 at 20:50
  • Are you using SmartClient LGPL ? I'm not sure but I think that RestDataSource supports queueing...otherwise take a look at this blog post: https://smartclientexperience.wordpress.com/2008/11/10/saving-all-listgrid-changes-at-once/ – claudiobosticco Nov 11 '15 at 21:04