Child table toggle display

Review comments child table have attach button …it does not have any attach files in the table it should not display attach button .
My issue is i’m not attach file in second row but attach button shown and i try to like this in js
for (var i = 0; i < frm.doc.review_comments.length; i++){
if (frm.doc.review_comments[i].attach){
cur_frm.fields_dict[“review_comments”].grid.toggle_display(“attach”, true);
else if(frm.doc.review_comments[i].attach == undefined){
cur_frm.fields_dict[“review_comments”].grid.toggle_display(“attach”, false); cur_frm.refresh_fields();

Any one help me,
Thanks for advance.

Please provide a screenshot it will be a great help for others to help you out.


I added files in first row and not add file second row but it’s show attach button

When you required attach button and when you don’t required attach button please explain.

Can you please give the use case for it?

Did you customize the DocType and which DocType is it?

No it’s not customize doctype…