Thanks for your reply.
The code which you sent changing the back color of a row, wherever I click in the gridview.
So entire grid resulted in red background color
My issue is to change the selected background color. To describe more, If I click on first row, background color should change to Dark Gray color. after that, if I click on second row, first row should get reverted to previous color and second row background color should be in darkgray color.