Listgrid Edit

Hi,
I use an editable listgrid. I notice that only changed columns are sent back to the server. So If I have 4 editable columns, and I edit 1 column and click save, only the edited column is sent back to the server.

However for a dynamic form, all fields are sent back, not just the edited field.

Can we configure listgrid to send all columns of a row?

Thanks for your response.
Ganesh

Add the logic to send all values in your DataSource transformRequest(..) override.

Thanks will try that. How do I serialize the selected record ? I can’t seem to find the method that converts a ListGridRecord to Javascript object?

Thanks
Ganesh

record.getJsObj()

Thanks, it works

It works, but the inconsisentency that I want to point out is:

  1. For a new record saveAllEdits sends all columns

  2. For an existing record saveAllEdits sends only the changes.

This essentially means, we need two sets of logic, one for insert mode, one for update mode, messy code etc.

Thanks
Ganesh

This is by design. When an existing record is edited, only the PK field, and the edited field data is sent to the server. This is all the information that should be required for the server to update the field. This is more efficient than sending all the data including the unchanged fields.

Sanjiv

Where do we override this method. DataSource’s implementation seems to be calling a native javascript method.

In my case, i have grid with is bound with server side using a xml based data source and i also want to send all values of a row to server irrespective of which field was updated.

I am using version 1.1

Kindly advice.

Hi,

Check this post: http://forums.smartclient.com/showthread.php?p=25833#post25833

There is a code for combining original values with changes.

Alius.