Changing row colour in data grid

Changing row colour in data grid

i want a program when i click on the particular row in the data grid that row will set to some color and similarly when i click on another row that row color should be changed and it should hold the previous row color also pls help me out regarding this example as soon as possible..

Add Comment

Put code snippets inside language tags:
[language] [/language]

Examples:
[javascript] [/javascript]
[actionscript] [/actionscript]
[csharp] [/csharp]

See here for supported languages.

Javascript must be enabled to submit anonymous comments - or you can login.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.