highlight row in datagrid

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

Grey

i know how to highlight row in the datagrid, but how to deselect the row
when user click another one.
 
If you are talking about client side highlighting, you should just keep a
reference to the selected row in a variable and apply to it visual
properties for unselected row just before making another one selected.

Eliyahu
 
This is the code for client side :
var selectedRow = null;
function fnSelectRow(rowObject)
{

if (selectedRow != null)
{
selectedRow.style.backgroundColor = '#ffffff';
}
selectedRow = rowObject;
selectedRow.style.backgroundColor = '#CAD3E4';
}

this function should be called on e.attributes.add("onclick"
,"javascript:fnselectRow(this)").

I am having the problem to select all the rows when i click the checkbox in
the Datagrid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top