When a grid modified from outside changes reflect in grid

Hi All
I have one question i have a problem when a grid changed from outside all editable fields in the grid should be reflected .

How to do it?

For example I have a approve all checkbox outside the grid. I have a check box in the grid column (approve -YES or No) if i select approve all check box all the rows in the grid should become YES(i.e., checked).

I need help for the above

thanks in advance

using getAllRowIds problem solved