View Full Version : [CLOSED] gridpanel: access to cell values server side

Nov 26, 2014, 8:48 AM

I am working on a MVC project containing an editable gridpanel which has to keep line and column totals always updated.

Also, if a user modifies a cell containing a total value, this must be splitted on all the corresponding cells (ie, if he modifies a line total, that value must be splitted on all the cells of that line).

So, if a user modifies the value in a cell, the corresponding line and column totals must be changed.

The gridpanel is asynchronous with the database, since until the user can choose when to save the changes to the db.
Until that time, the changes remain in the store.

I can access in modify to the cells of the table thanks to

ModelProxy record = store.GetAt(l);
record.Set(fldColonna, ValoreDaScrivere);

What I cannot do is calculating the total per row (or per column) since I have not found a record.Get(filedName) method similar to the record.Set(fieldName, fieldValue)

So my question is: is ther such a method that allows me to get the value of a field in a record?

Please notice that I cannot rely on the model, since the values in the cell may have been modified but not saved, so I should work only with the store.

I had developed this method client that accessed all the cells:

for (l = 0; l < e.grid.store.totalCount; l++) {
for (c=0; c < e.grid.columns.length; c++) {
e.grid.store.getAt(l).get(e.grid.columns[c].dataIndex); //e is the cell being edited

What I don't have server side to reply the method is just the .get() for the record

Thank You

Nov 26, 2014, 7:12 PM
Hi Marco,

The Store's data is not submitted to server automatically. You can send a record's data to server manually via a DirectEvent/DirectMethod's parameter.