laughin
February 3, 2020, 12:17pm
1
Hello, I need to set read-only specific row in child table.
In the figure below, I can make the fields in the whole table read-only. But i must set read-only specific fields in rows
cur_frm.fields_dict.xxxx_table.grid.fields_map.xxxx.read_only = true;
Thanks for helps.
There is no easy way that i know, maybe you can try playing around with jquery and changing some css of the particular field that you need.
sagarg
February 3, 2020, 4:30pm
3
@laughin , it is possible only if you have some differentiating factor/field to do so.
var data = frm.doc.child_name;
data.forEach(function(e){
if (e.child_field == "factor"){
$("[data-idx='"+e.idx+"']").hide()
}
})
in the same way you can set the row read_only.
1 Like
Hi, I want to implement this code of yours to my code. Could you elaborate this? Where will I put this code in js?