How to hide "Remove" Button in Child Table

I have created a Child table for “Support >> Issue”, In child table, any body can remove entered Rows.

How to hide “Remove” Button in Child table, so that nobody can remove rows once entered.

@Ram_Gopal_Rao, a good aproach for this, is dont use a child doctype for this cases.

Create a normal doctype, apply the permissions that you need.

About the actual subtable, you can replace it by a simple HTML table, and load the content from the other doctype.

1 Like

Dear max,

I have problem only with “Remove” Button in child table.

Is there any other solution to hide or disable this button?

@max_morais_dmm
Dear max,

I have problem only with “Remove” Button in child table.

Is there any other solution to hide or disable this button?
[/quote]

@Ram_Gopal_Rao, no have a solution!

So I found this issue unresolved while I was looking for something else.

hideTheButtonWrapper = $('*[data-fieldname="transfers"]');
hideTheButtonWrapper .find('.grid-remove-row').hide();

You’ll need to substitute your own table name where it says '*[data-fieldname="transfers"]'. I recommend inspecting the source of the button you’re trying to hide.

Hi
It is late but may help someone. Please try following code to remove add row and delete row button inside of child table:
[child_table_name]_on_form_rendered:function(frm, cdt, cdn){
frm.fields_dict[‘child_table_name’].grid.wrapper.find(‘.grid-delete-row’).hide();
frm.fields_dict[‘child_table_name’].grid.wrapper.find(‘.grid-insert-row-below’).hide();
frm.fields_dict[‘child_table_name’].grid.wrapper.find(‘.grid-insert-row’).hide();
}

2 Likes

Try this.
$(‘[data-fieldname=“items_table”]’).find(‘.grid-remove-rows’).hide()

1 Like

try this,

cur_frm.fields_dict[‘child_table_field_name’].grid.wrapper.find(‘.grid-remove-rows’).hide();

1 Like