I just want to hide insert below and insert above button from pop-up grid.
i tried using this:
frm.get_field(“employees_details”).grid.only_sortable();
But i want other option.
Please help me with your valuable suggestion.
I just want to hide insert below and insert above button from pop-up grid.
i tried using this:
frm.get_field(“employees_details”).grid.only_sortable();
But i want other option.
Please help me with your valuable suggestion.
Hi @vivek22793
Are you able to hide Insert Below and Insert Above buttons in child table?
If you have done, can you tell me the process to implement?
Thanks, && Regards,
Sunil.
You have to make that field read only. and whatever insertion you want to do that has to be done using scripts.
Hi,
@vivek22793 Please share me the code.
This task can be done using edit doctype
make your table field read only.
That’s It.
Thanks for your response @vivek22793
But it’s not working.
Hello @Sunil_Govind, try this,
document.getElementsByClassName(“btn btn-default btn-xs pull-right grid-insert-row-below”)[0].style.display=‘None’; // to hide insert below button
document.getElementsByClassName(“btn btn-default btn-xs pull-right grid-insert-row”)[0].style.display=‘None’; // to hide insert above button
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();
}
This may help you