Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Save records with ListGrid.endEditing()

    Version: SNAPSHOT_v9.1d_2013_10_15

    Hi Isomorphic/All,

    I know that am I missing something, but what is it?

    I have the next scenario:
    - A GridList which datasource is fetch directly from the database and autoSaveEdits: true.
    - Every record on this GridList have 3 fields:
    * quantity (editable)
    * price (non editable)
    * total (non editable)

    - In a ToolStrip embedded to this Grid, there is a save button that calls on click: GridList.endEditing();

    When QUANTITY field changes the next action is taken:
    record.total = record.quantity * record.price

    Why when I press the save button, my calculated value (record.total) is not present in the database?
    I can see it in the grid, but it is not saved.

    What am I missing?
    The documentation says, that if endEditing() is called with autoSaveEdits: true, the changes are saved in the server.

    Pls help.
    Thanks in advance

    #2
    If the user did not directly edit the total field, but you want it saved anyway, use setEditValue() to cause it to be considered as a user edit and saved.

    For background, see the Grid Editing overview.

    Comment


      #3
      Thanks

      Thanks Isomorphic for your help.
      I already read that documentation and now its working as expected.

      Comment

      Working...
      X