Client side JS:
function setRowColor()
{
rowId = parseInt(frmMain.all["rowIndex"].value);
if ((rowId != -1) && (window.document.all[rowId].tagName == "TR"))
{
//window.document.all[rowId].style.backgroundColor = "yellow";
window.document.all[rowId].cells[0].style.backgroundColor = "yellow";
window.document.all[rowId].cells[1].style.backgroundColor = "yellow";
}
}
HTML
<body MS_POSITIONING="GridLayout" onload="setRowColor()"
bgcolor="ActiveBorder" scroll="no" leftmargin="10" topmargin="0"
rightmargin="10" bottommargin="0">
In code behind do something like:
if post back
...
string rowSourceIndex = Request["rowIndex"];
if (itemClicked != "")
getRelatedItems();
Page.RegisterHiddenField("rowIndex", rowSourceIndex);
...
else
Page.RegisterHiddenField("rowIndex", "-1");
Email me off list if you have trouble with the above code.