Title: some fields readonly only if existing row Post by: markalves on April 19, 2020, 10:13:58 AM Hi I would like to set some fields readonly only if editing existing row:
Existing rows I want to make readonly have a colum set to 9, I made in this way: onBeforeEdit: function(index,row){ var col = $(this).edatagrid('getColumnOption', 'qta'); alert(getSelectedValue('#dg3', 3)) if( getSelectedValue('#dg3', 3) == 9) { col.editor = null; } else { col.editor = 'text'; } } It works but if after editing these rows then I add a new row selectedvalue remain to 9 and it remain readonly. Is there a way to verify if new row or after editing clear buffer ? |