Is that possible to make the particular fields in child table for particular row??
@Praveenkumar Please check this code with change your field name and child_table name
frm.fields_dict.items.grid.get_field('**child_table_field_name**').get_query = function(doc, cdt, cdn) {
var row = locals[cdt][cdn];
if (row.item_code) {
cur_frm.fields_dict.child_table.grid.grid_rows[row_no].docfields[field_idx].read_only=1
cur_frm.fields_dict.child_table.grid.refresh()
}
};
2 Likes
$(frm.wrapper).on(āgrid-row-renderā, function(e, grid_row) {
if(grid_row.grid.df.fieldname==āchild_table_field_nameā){
if(grid_row.doc.field_name_in_child_table==āCompletedā) {
grid_row.wrapper.one(āfocusā,āinputā,function(e){
grid_row.toggle_editable(āfield_name_to_editableā, false);
})
}
}
}
1 Like