0

I have got a single grid on my page, and when it drops into inline edit mode there are some fields i would like to fill in (price based ones) as soon as the user has filled the first one in, for example they put a price of 50 in, i want to update the nett and gross fields.

Normally i would do this using a jquery blur function, but i'm not sure how to get the names of the input boxes on the grid, they seem to be a number depending on the row, then the name of the field.

Thanks Luke

beakersoft
  • 2,316
  • 6
  • 30
  • 40

1 Answers1

0

Typically is you need update the cell after the user modified the cell value one use cell editing mode. In case of usage inline editing mode for row editing you have some options:

  • you initialize inline editing with keys: true parameter and the row will be saved after the user press Enter key. The user can any time discard the changes by pressing Esc key.
  • you provide some button which the user can click to save the changes. You can use formatter: 'actions', inlineNav or your custom button to do this.
  • You can implement saving of current editing row inside of onSelectRow or some other callback.

In any way the standard way in inline editing mode is working with rows without additional actions on cell basis. If you do need to bind blur or focusout event to all input fields of editing row you can use dataEvents with type: 'blur' (or type: 'focusout'). To easy define the editoptions for all columns you can use cmTemplate option of jqGrid (see here).

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798