I am using a listgrid that has one of its fields with a summary function (via setSummaryFunction()). It is linked to a data source which has setClientOnly(true). I can add, remove and update full records fine using the addData(), removeData() and updateData() functions fine with the list grid displaying correctly.
However, when I only populate only the values that have changed in a record and send that via updateData() to the data source, if I omit the field that corresponds to the field in the listgrid with the summary function, I found my code behaves as no value is present when the listgrid updates.
While I could work around the problem I was assuming that updating the record in the data source would effectively merge the changed and unchanged values in the listgrid and the summary function would operate on the unchanged value when a refresh was triggered (rather than it believe it does not exist). I am now wondering if my understanding is actually incorrect and I have to send a full record even if some values are unchanged ...
So before I adjust my code I thought I should check: Am I using updateData correctly? Should all fields in my record to updateData be filled even if they are not changed - especially ones that have a summary function on that field in the listgrid - even if they are unchanged? Updates seem to display correctly otherwise (even if only a single field is changed in the record).
I am using SmartGWT LGPL 3.0.
However, when I only populate only the values that have changed in a record and send that via updateData() to the data source, if I omit the field that corresponds to the field in the listgrid with the summary function, I found my code behaves as no value is present when the listgrid updates.
While I could work around the problem I was assuming that updating the record in the data source would effectively merge the changed and unchanged values in the listgrid and the summary function would operate on the unchanged value when a refresh was triggered (rather than it believe it does not exist). I am now wondering if my understanding is actually incorrect and I have to send a full record even if some values are unchanged ...
So before I adjust my code I thought I should check: Am I using updateData correctly? Should all fields in my record to updateData be filled even if they are not changed - especially ones that have a summary function on that field in the listgrid - even if they are unchanged? Updates seem to display correctly otherwise (even if only a single field is changed in the record).
I am using SmartGWT LGPL 3.0.
Comment