I have some filed that I want to hide a field
I have tried some of the solutions but it is not reflecting on child
frappe.meta.get_docfield(“Material Request Item”, “block” , cur_frm.doc).hidden=1
it is showing on cur_frm.doc that it’s value is been hidden but on grid view, it is still showing it.
Does anyone have a solution to it?
@OmarJaber
By this it will hide specific Column but I want to hide row according to parent table Field
In “Display Depends On” you can do something like eval:parent.PARENT_FIELD
@lucasvazq But afetr writing Display Depens On also my column in child table still shows on screen .it s not hidden. Why this happen?
if we write ‘Display Depends On’ and still it matters our js files code
If you just want to hide the column from the child table you can simply write the js script for that and add a function on refresh
frm.fields_dict[table_name].grid.fields_map[column_name].hidden = 1
and if you have inculde the field in your table header hidding the coloum will surely hide your field but to remove it from your table header you have to rebuild the header. You can try this
grid = frm.fields_dict[table_name].grid
grid.fields_map[column_name].hidden = 1
grid.visible_columns = undefined;
grid.setup_visible_columns();
grid.header_row.wrapper.remove();
delete grid.header_row;
grid.make_head();