Label field link problem?

Hi!

Earlier I found out that I cannot create a field link by using onClick event in an editable grid view of a form application,
so I tried to create a link for each row of record by using a label field with something like:
{link}=’<a href=“http://www.google.com”><img src=“some location”></a>’;

and placed this at an onLoad event:

But this only works when the application load the first page of records for the first time,
if you try to go to next page, the link image link appears fine, but if you try to go back to a previous page, something like this might happen
(I tested this on another form application but this didn’t happen.
Don’t know why but seems that if I create application on a specific database’s table, this won’t happen):

Is there any way to fix this?
Or will there be another better way to add a field link properly in an editable grid view of a form application??

Capture1.PNG

Capture2.PNG