Using the cellbeginedit
function in the columns
property, you can define which column is editable or not.
You have to define it on each column and inside the function, you check the value of the Verified
column to determine if the column is editable (return true
) or not (return false
).
The function takes 3 arguments
- The row index: which can be used to get all the row data (function
getrowdata
of the grid).
- The datafield: the one you've defined in the
columns
property.
- The column type.
So, your rowEdit
function should look like this:
var rowEdit = function (rowindex, datafield, columntype) {
if(datafield != "Verified"){
var rowdata = $("#itemGrid").jqxGrid('getrowdata', rowindex);
return rowdata.Verified == "YES";
}
return true;
}
I've used the value YES
for the Verified
column, because I ingore which is the correct value for this data.
But, you can replace with the good one.