free-jqgrid / jqGrid

jQuery grid plugin
https://github.com/free-jqgrid/jqGrid
Other
480 stars 195 forks source link

All rows in “inline edit mode” by default #467

Open Naveencheekoti opened 5 years ago

Naveencheekoti commented 5 years ago

I have a jqGrid where a row is editable on click (i.e. 'editRow' inside 'OnSelectRow' works fine). But my requirement is to "load the grid with ALL ROWS IN EDIT MODE by default (Inline edit)", so there should not be any need for me click individual rows.

I tried the below code but didnt work

loadComplete: function () { var $this = $(this), rows = this.rows, l = rows.length, i, row; for (i = 0; i < l; i++) { row = rows[i]; if ($.inArray('jqgrow', row.className.split(' ')) >= 0) { $this.jqGrid('editRow', row.id, true); } } }

it is showing editable rows.But when i click on the pagination it is not working.Can any one help on this issue.

antoineluong commented 5 years ago

Did you look at the pagingDuringEditing option?

New main features implemented in the version 4.15.5 compared with 4.15.4: [...] Add 3 new option: sortingDuringEditing, pagingDuringEditing, reloadingDuringEditing with values "prevent", "cancel" or "save". The default behavior in previous versions of jqGrid: preventing sorting if the grid is in inline or in cell editing. Including new option sortingDuringEditing: "cancel" or sortingDuringEditing: "save" will allows sorting. The currently editing data will be discarded or saved depend on the value of sortingDuringEditing option. The same problem exists in case of paging or reloading the grid. The options pagingDuringEditing, reloadingDuringEditing helps to specify the desired behavior.