日期:2014-05-17  浏览次数:20390 次

checkbox 和gridview绑定全选的问题
想通过表头模板HeaderTemplate中的CheckBox 实现全选的功能,还有就是单选改变行背景色(我设置了光棒效果,所以改变背景色后鼠标滑过就失效了)
<asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBoxItem" runat="server" Text="查看"/>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <asp:CheckBox ID="CheckBoxAll" runat="server" Text="全选" />
                        </HeaderTemplate>
                    </asp:TemplateField>

------解决方案--------------------
Refer these:
http://www.cnblogs.com/insus/archive/2013/05/22/3093114.html

http://www.cnblogs.com/insus/articles/1443165.html