i'm having n number of rows in table.

My problem is :

1.When the user selects one row from table, the row color should be changed to xyz color.
How can this be done?