Control specific column editing according to row status
You can use dynamic styles to control editing of specific columns based on row state. After querying, the name column cannot be edited, but the inserted/added rows can be edited.
Check the styleCallback section.
var columns = [
{
name: "KorName",
fieldName: "KorName",
width: "60",
header: {
text: "name"
},
styleCallback: function(grid, dataCell){
var ret = {}
if(dataCell.item.rowState == 'created' || dataCell.item.itemState == 'appending' || dataCell.item.itemState == 'inserting'){
ret.editable = true;
} else {
ret.editable = false;
ret.styleName = "orange-column";
}
return ret;
}
},
... skip ...
];
gridView.setColumns(columns);