Make read_only 0 to multi rows in Sales invoice item table

Currently my code able to make read only to first row , how to achive this for multiple rows.
cur_frm.get_field(“items”).grid.grid_rows[0].columns.rate.df.read_only = 0;

Even i run thorugh for loop also i am not able to make that field as read_only

Hi @vijayvithal,

I think you should check the whole post.

I hope this helps.

Thank You!

1 Like

This might work for you!.

frappe.ui.form.on(‘Sales Order’, {
refresh(frm) {
// your code here
var row = 0
while(row != frm.doc.items.length){

  frm.get_field("items").grid.grid_rows[row].columns.rate.df.read_only = 1;
  row+=1
  }

}
})

1 Like

This code is working perfectly…