color change in row of grid ..

how can we change the color of paticular row on the click of html button ??

There are few ways, most simple is
        first - row ID
        second - new color value

Actually on the click of a html button i am getting row id of some rows based on a particular condition  using an ajax function .Now i have to change the color of these rows .

 I think cannot use  “mygrid.setRowColor(id,“red”)” inside that ajax function . Help…

I’m not sure, why you can’t use this functionality from your ajax function ?
The method can be called from anywhere , you just need to specify correct object reference and correct row ID