Hello All,
How to conditionally show or hide a column in child table, please find the below example from routing.js ( erpnext )
frappe.ui.form.on(“Routing”, {
refresh: function (frm) {
frm.trigger("display_sequence_id_column");
},
onload: function (frm) {
frm.trigger("display_sequence_id_column");
},
display_sequence_id_column: function (frm) {
let show = true;
frm.fields_dict.operations.grid.update_docfield_property("sequence_id", "in_list_view", show ? 1 : 0);
},
}
currently frm.fields_dict.operations.grid.update_docfield_property(“sequence_id”, “in_list_view”, 1); works only after manually clicking this “reset to default” else it does not work.
let show = true; // in my scenario this is based on a value from a checkbox field.
based on the selection without resetting columns how can we dynamically show or hide columns of child table based on the checkbox value?
Thanks in adv.