HTML Image field with feedback

Dear Forum Members,
Please help me on the below occasion.
I’ve a editable grid form, which has 4 fields on which one is Html image and one is a single valued checkbox.

The html image is linked to a blank (which process a huge transaction on db).

When I click the html image field that open up the modal of the blank, I want to close that modal programatically after completion of the transactions as well mark the checkbox.

Any help will highly appreciated.

Thanks & Regards
Rajibul