PDA

View Full Version : Firing Cell-Level Updates



alphadogg
7 Sep 2010, 2:50 PM
Is there any way to fire off an update back to the server when a cell is changed? If so, how? (And, if it matters, from a JsonStore and related components.)

Animal
7 Sep 2010, 9:17 PM
That's the default behaviour of a writable Store.

You actually have to configure it autoUpdate: false to inhibit that. So what's the question?

Condor
8 Sep 2010, 12:01 AM
Emphasis on 'writable'. You need to configure a JsonWriter for this.

alphadogg
8 Sep 2010, 7:26 AM
That's the default behaviour of a writable Store.

With further rummaging through the API, I think I am looking at the wrong culprit. I guess the grid fires off an update through the store when I "exit" a record placed in edit mode. I'm looking at the RESTful example and wondering if there is a way to fire off an update on a per-cell basis, rather than per-record, in a grid.


So what's the question?

I'm curious. How did you manage to partly answer the question without reading it?

Animal
8 Sep 2010, 7:34 AM
A writable Store will update the server as soon as one single field of a record is modified

But if you are using the RowEditor, it does not modify fields seperately, but all at once when you click "Update".

If you use an EditorGridPanel, backed by a writable Store, you would get the HTTP-heavy behaviour of an update on each cell edit.

Animal
8 Sep 2010, 7:34 AM
How's that? I even inferred information you were witholding!