This is a migrated thread and some comments may be shown as answers.

Highlight a radgrid cell on rowmouseover

2 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Meng
Top achievements
Rank 1
Meng asked on 19 Dec 2012, 01:30 PM
Hi there,

It is easy to highlight an entire row using radgrid rowmouseover event, but I need to highlight a radgrid cell on rowmouseover, not the entire row. Anyone suggestions would be appreciated. 

Thanks,
Meng 

2 Answers, 1 is accepted

Sort by
0
Accepted
Florence
Top achievements
Rank 1
answered on 19 Dec 2012, 04:45 PM
Hi Meng,

If you have access to the entire row in this event, you can access the needed cell by column unique name. Try this:

function RowMouseOver(sender, eventArgs) {
    var rowIndex = eventArgs.get_itemIndexHierarchical();
    var item = sender.get_masterTableView().get_dataItems()[rowIndex];
    item.get_cell("ColName").style.background = "red";
}
0
Meng
Top achievements
Rank 1
answered on 19 Dec 2012, 07:44 PM
Hi Florence,

Thanks for your help. The issue is fixed now.

Best regards,
Meng
Tags
Grid
Asked by
Meng
Top achievements
Rank 1
Answers by
Florence
Top achievements
Rank 1
Meng
Top achievements
Rank 1
Share this question
or