Как я могу отследить, какая строка редактируется, когда пользователь отредактировал editable
textarea
в jqgrid
.
$("#accJqgrid").jqGrid({
url: path,
postData: { deviceId: deviceId, loadId: 'Hardware' },
datatype: 'json',
mtype: 'POST',
width: 650,
height: 150,
colNames: ['', 'ID', '', '', 'Description', '', '', 'Comments', 'Delete'],
autowidth: true,
colModel: [
{ name: 'state', width: 30, sortable: false, hidden: true },
{ name: 'ID', width: 30, sortable: false, hidden: true },
{ name: 'catalogId', width: 30, sortable: false, hidden: true },
{ name: 'Save', width: 30, sortable: false, formatter: saveAccessoryData },
{ name: 'Description', width: 250, sortable: false },
{ name: 'Search', width: 30, sortable: false, formatter: searchAccessory },
{ name: 'License', width: 0, sortable: false, hidden: true },
{ name: 'Comments', width: 380, sortable: false, edittype: 'textarea', editable: true, editoptions: { rows: "2", cols: "73", dataInit: function (elem) { $(elem).attr("maxlength", "250"); } } },
{ name: 'Delete', width: 50, sortable: false, edittype: 'checkbox', formatter: 'checkbox', editable: true, align: 'center', classes: 'deleteBackgroundColor' }
],
rowNum: 50,
pagination: true,
rowList: [25, 50, 100],
pager: $('#accJqgridpager'),
gridComplete: function () {
}
},
afterInsertRow: function (id, data) {
jQuery('#accJqgrid').jqGrid('editRow', id);
}
});