1、新建一个继承自GridView的类。

2、加一个属性,用来指定鼠标经过行时,行的css类名

3、重写OnRowDataBound实现鼠标经过行时改变行的样式的功能。主要是给<tr>增加onmouseover事件和onmouseout事件。

4、测试
=========ASPX文件=======
<zyz:SmartGridView ID="sgvList" runat="server">
</zyz:SmartGridView>

=======css文件======
.over 

参考

相关文章: