VINOTH
February 3, 2023, 10:59am
#1
Hi, People
How to delete the selected checkbox, from the child table.
I have tried the below code to delete the selected row but while saving the button it’s deleting the below unchecked row. How to solve this?
$.each(frm.doc.table_2, function(index, source_row){
if(source_row.check_6 == true){
frm.fields_dict['table_2'].grid.grid_rows[source_row.check_6].remove();
frm.refresh_field("table_2")
}
})
Thank you.
VINOTH
February 3, 2023, 11:47am
#2
Hi, Thank you all I have find the solution.
$.each(frm.doc.table_2, function(index, source_row){
if(source_row.check_6 == true){
frm.fields_dict['table_2'].grid.grid_rows[index].remove();
frm.refresh_field("table_2")
}
})
VINOTH
February 4, 2023, 11:11am
#3
Hello, Guys
The way I have solve the above problem is not deleting the row in the right format. Even the unselected rows getting disappear. Kindly help me out of this.
What is the right way to delete the selected Rows only?
I have attached my code.
$.each(frm.doc.table_2, function(index, source_row){
if(source_row.check_6 == true){
frm.fields_dict['table_2'].grid.grid_rows[index].remove();
frm.refresh_field("table_2")
}
})
Thank you