Remove edit form child table

Hello Guys

I want to remove the edit in the child table. Is there any option?

Please help me with this

Screenshot from 2022-05-11 15-46-37

You can make all fields of the child table read only

Thanks @khushal_t for the reply . That works

But I need to remove the edit option.
I removed the delete/add row button. is there any option to hide edit?

Hi @jinsy,

Please apply it.

frappe.ui.form.on('Your DocType', {
    refresh:function(frm, cdt, cdn) {
        cur_frm.fields_dict['your_table_name'].grid.wrapper.find('.btn-open-row').hide();
    }
}); 

Then Reload and check it, Please.

Thank You!

4 Likes

Thanks @NCP

That works. :grinning:

frappe.ui.form.on(PARENT_DOC_TYPE, {
refresh: function (frm) {
frm.set_df_property(‘CHILD_TABLE_FIELD_NAME_IN_PARENT’, ‘in_place_edit’, true);
}
});

Or set this property in Property Setter as shown in below image my parent table is Lumber Sale and load_distribution is filed name of child table in Lumber Sale