I have a table which i am using as a data grid. When the user clicks on a row i highlight that row a certain colour. What I need to do though is loop through all the other rows and make their bgcolor the opposite colour so that only one highlighted row exists. I don't know how many rows will be in the table as it is db generated. how can i loop through each row in a table and so change its bgcolor?