i wanna hide the Add row button
i made all the child table read only but in vain
this.frm.get_field("items").grid.cannot_add_rows = true;
This would disable the add_row button, although if you expand the row you’d still get a choice to
insert above or
insert below option.
This will disable the add_row as well as the options inside the expanded row.
Try this jQuery hack, which is for the “Delete” button in a child table. It’s the same logic as for the “Add Row” button. Or hide them both!
For the “Add Row” button…
hideTheButtonWrapper = $('*[data-fieldname="transfers"]'); hideTheButtonWrapper .find('.grid-add-row').hide();
… where “transfers” is the name of your child table.
DocType Button Color
Why you want to remove add row option? Is the table pre-field?
frappe.ui.form.on(“Sales Order”, “onload”,function(frm,cdt, cdn)
i want to select data from time attendance device in this grid , and it is not logic to add row which is not in device
This will hide all of the add rows in the child tables in the document. That’s probably not good for a document with more than one child table, like your example in Sales Order.
cur_frm.set_df_property(“properties_list”, “read_only”, 1);
properties_list is your childtable field name… its working 100% please close this topic and mark as solution