TABLE (onRowSelect( )) - change button color

Hello mates,

I have made my database table for my house listing and I want to make a selection to my houses by the buttons.
I want to make that selected row change the right house button color.

For example: If I select 2 house on my table the button number 2 should change color to green as in table.

Can someone help me to find right functions?Please! :wink:

Thank you!