Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
1,333
Widok
0
25/06/2018 3:40 pm
Topic starter
even before inline mode
1 Answer
0
25/06/2018 3:42 pm
Topic starter
1. create checkbox col with edittype:’checkbox’
2. set formatoptions: {disabled: false}
3. prepare event
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
beforeSelectRow: function (rowid, e) { var $self = $(this); iCol = $.jgrid.getCellIndex($(e.target).closest("td")[0]); cm = $self.jqGrid("getGridParam", "colModel"); var localData = $self.jqGrid("getRowData", rowid); if (cm[iCol].name === "MY_NAME_OF_CHECKBOX" && e.target.tagName.toUpperCase() === "INPUT") { localData.MY_NAME_OF_CHECKBOX = $(e.target).is(":checked"); $.ajax({ type: "POST", url: "SERVER/savedata", data: $self.jqGrid("getRowData", rowid) }); } return true; } |
beforeSelectRow: function (rowid, e) { var $self = $(this); iCol = $.jgrid.getCellIndex($(e.target).closest("td")[0]); cm = $self.jqGrid("getGridParam", "colModel"); var localData = $self.jqGrid("getRowData", rowid); if (cm[iCol].name === "MY_NAME_OF_CHECKBOX" && e.target.tagName.toUpperCase() === "INPUT") { localData.MY_NAME_OF_CHECKBOX = $(e.target).is(":checked"); $.ajax({ type: "POST", url: "SERVER/savedata", data: $self.jqGrid("getRowData", rowid) }); } return true; }
4. url: ”SERVER/savedata”, is same value of field editurl