1

We are aware of how to allow users to edit multiple jqGrid rows - but how would one have a single save button that saved all edited rows?

Marcus Leon
  • 53,069
  • 115
  • 287
  • 420

1 Answers1

1

We do it manually (not with a jqGrid feature).

We have a custom formatter which draws editors and we put a <form> tag around the whole grid, with a submit button at the bottom.

Craig Stuntz
  • 124,853
  • 12
  • 249
  • 270
  • So you reload the whole page and grid for a form submission? Did you try doing it using AJAX? – Marcus Leon Sep 17 '10 at 21:10
  • No, we don't reload. We submit the form with AJAX, as you guessed. – Craig Stuntz Sep 17 '10 at 22:13
  • Any way you could post a code snippet to get the feel of how you accomplished this? (We're new to AJAX and jqGrid) – Marcus Leon Sep 18 '10 at 16:49
  • We use Malsup's ajaxForm plug-in for jQuery. Works fine and there are examples on the site. – Craig Stuntz Sep 18 '10 at 18:25
  • @CraigStuntz, Can you let me know how do you do a custom format for select box in the grid, which loads its options from server w.r.t. above mentioned scenario. I'm kind of stuck here...! `{name:'code', width:150, editable:true, edittype:"select", editoptions: { name:'code'+'['+'item_id'+']', dataUrl: '/lists/code_list/', buildSelect: function (data) { return ""; }}},` This is what I tried till now. When I click save button this element won't come in the ajax post. – J Bourne Nov 12 '11 at 15:00
  • @Sai: Post this as a new question with more details. – Craig Stuntz Nov 13 '11 at 03:16
  • @CraigStuntz , Please find it here[1] [1]: http://stackoverflow.com/questions/8091417/formatting-select-boxes-while-doing-a-multiple-row-saving-in-jqgrid – J Bourne Nov 13 '11 at 06:26