highlight row in datagrid

G

Grey

i know how to highlight row in the datagrid, but how to deselect the row
when user click another one.
 
E

Eliyahu Goldin

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
 
G

Guest

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top