Hi,
iam having problem to add a mouseover effect in GridView. Iam using RowDataBound to add the following attributes to a TableRow:
e.Row.Attributes.Add("onmouseover", "style.backgroundColor='#EFEFEF'");
e.Row.Attributes.Add("onmouseout", "style.backgroundColor='#FFFFFF'");
The generated HTML looks fine to me so far:
<tr onmouseover="style.backgroundColor='#EFEFEF'" onmouseout="style.backgroundColor='#FFFFFF'">
<td><a href="javascript:__doPostBack('ctl00$ctl00$PlaceHolderMain$PlaceHolderContent$ObjectList','Select$2')">test10</a></td>
<td>[email protected]</td>
<td>True</td>
<td>4/8/2008 10:11:18 AM</td>
<td>4/8/2008 10:11:18 AM</td>
<td>4/8/2008 10:11:18 AM</td>
<td>4/8/2008 10:11:18 AM</td>
<td>False</td>
</tr>
The current row (hover) is not highlighted but the same code works fine using the "default" GridView without adapter.