EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: markalves on September 17, 2019, 12:39:56 AM



Title: edatagrid lock edit if a column have a certain value
Post by: markalves on September 17, 2019, 12:39:56 AM
Hi,
how I can make a row readonly (not editable and not deletable) if a column in edatagrid have a certain value ?


Title: Re: edatagrid lock edit if a column have a certain value
Post by: jarry on September 20, 2019, 10:41:00 AM
Returning false in 'onBeforeEdit' event will abort the editing action.
Code:
$('#dg').edatagrid({
onBeforeEdit: function(index,row){
// return false on some conditions
return false;
}
})