Reylin Mathew

Reylin Mathew

  • NA
  • 347
  • 75k

How to add Edit and Delete button for jq tablefor every row

Apr 12 2019 1:00 AM
function gridBind() {
debugger;
var userid = "109";
jQuery("#gridTable").trigger("reloadGrid");
var parameters = "{'ID':'" + userid + "'}";
jQuery("#gridTable").jqGrid({
datatype: function () {
bindGridData();
},
colNames: ['NAME', 'AGE', 'ACTION'],
colModel: [
{ name: 'NAME', index: NAME', width: 30, align: 'left', sortable: false, hidden: false },
{ name: 'ÁGE', index: 'AGE', width: 20, align: 'left', hidden: false, editable: true, edittype: "text" },
{ name: 'ACTION', search: false, index: 'parameters', width: 35, sortable: false, formatter: deleteLink }
],
rowNum: 100,
rownumbers: true,
rowList: [10, 20, 30, 40],
sortname: 'DISPLAY_NAME',
pager: jQuery('#pageGrading'),
sortOrder: "ASC",
width: 700,
height: 200,
viewrecords: true,
multiselect: true,
cellEdit: true,
viewsortcols: [true, 'horizontal', true],
emptyrecords: "No record(s) to display",
loadtext: "Loading..."
});
jQuery("#gridTable").jqGrid('navGrid', "#gridTable", { edit: false, add: false, del: false, search: true, refresh: true });
}
 
 
this is my jquery function , i want edit and delete link in colmodel. how can i add.? plz help me

Answers (1)