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
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
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 }
}
})
This code is working perfectly…