I want to hide settings icon in child doctype for the user

Hi All,

I need to hide settings icon from chid doctype,user dont want to hide or remove the fields in table.


Can you Please help me out.

frappe.ui.form.on("Doctype Name", {
    // you can also use onload event here
    refresh(frm) {
        $('use[href="#icon-setting-gear"]').parent().hide()
    },
});
3 Likes

Hi @ejaaz

I tried.but it not works.
Thank You!!..

@Pradeep_Manoharan Have you got the solution?

No…@parthfadadu


go to your child table doctype and uncheck the editable grid option thank you

1 Like

Try This

frappe.ui.form.on('Partner Books', {
    refresh: function(frm) {
        const grid = frm.fields_dict.transaction_history.grid;
        
        grid.wrapper.find('.grid-row').css('pointer-events', 'none');
        grid.wrapper.find('.btn-open-row').hide();

        const disableGear = () => grid.wrapper.find('use[href="#icon-setting-gear"]').closest('a').hide().off('click');
        grid.wrapper.find('.col.grid-static-col.d-flex.justify-content-center').css({'pointer-events': 'none', 'cursor': 'default'}).off('click');

        setTimeout(disableGear, 0);
    }
});

Replace Partner Books with your doctype name and transaction_history with your child field name