How to set individual child table cell read only based on another child table field

hi - The requirement is to make an individual cell in a child table to read only based on a condition and not to affect the the entire rows using the following code.

var df = frappe.meta.get_docfield(“items”,“unit_price_inr”, cur_frm.doc.name);
df.read_only = 1;

If anyone has dealt with this earlier can you please give a quick pointer.

I didn’t find any easy way… but you can check Taxes and Charges table in Purchase/Sales Order/Receipt/Invoice. When you select “Actual” amount for taxes, it disables the rate field and when you select “On Net Amount” or any other, it disabled the amount field.