I’m trying to make a child table in ERPNext read-only, so users can’t edit the field values — but I still want them to select and delete rows. However, setting the table as read-only currently disables all interaction, including row selection and deletion. I’ve tried using both “Read Only” in Customize Form and frm.set_df_property('table_field', 'read_only', 1) in a script, but both block any action. I’m looking for a way (or workaround) to make the rows non-editable while keeping delete and selection enabled.
can you please share your child table ss
hii there, do not just make the entire child table read-only, because this prevents any interaction with the rows. Instead, keep the table editable and set only the fields you don’t want users to edit as read-only. This way, users can still select and delete rows while the field values remain non-editable.
frm.fields_dict.child_table.grid.update_docfield_property(field, “read_only”, 1);
use this your requirement can be achieved
example
[‘asset_type’, ‘item_code’, ‘issued_quantity’, ‘acquired_quantity’].forEach(field => {
frm.fields_dict.items.grid.update_docfield_property(field, "read_only", 1);
});