Change the specified data row color in datagrid

  • Thread starter Thread starter Grey
  • Start date Start date
G

Grey

I used DataBinding to display a datasource in the datagrid. I have add one button on each row of the grid. I want to know that is it possible to change the only row color when I click the button on the row.


Million thanks
 
You can do it easily on client side. OnClick events gets a parameter which is the reference to the row that was clicked. Just change the color or apply another style from CSS. Here is an example of the event habdler:

function onRowClick(row)
{
row.className='SelectedRow';
}

Eliyahu
I used DataBinding to display a datasource in the datagrid. I have add one button on each row of the grid. I want to know that is it possible to change the only row color when I click the button on the row.


Million thanks
 
Back
Top