I am using a checkbox in my gridview. When the user checks the checkbox I change the background colour of the row to Black and when it is unchecked i change the background colour (of the row) back to its original colour (something other than black). All this is working well.
The problem:
If For example I was on row 4 of a an 8 row grid and I checked the checkbox row 4 backcolour is changed to black. If I then click the checkbox on row 6 of the grid I want the the backcolour on row 6 to go black and the backcolour on row 4 to revert to its original colour. I know how to handle row 6 but cannot work out how to move to row 4 to reset the back colour.
Any help would be greatly appreciated
kind regards
Javascript Code Below
function HighlightRow(chkB)
{
var Gridid = document.getElementById('GridStock');
var Buttonid = document.getElementById('btnNextForm');
var forecolour = chkB.parentElement.parentElement.style.color;
Bookmarks