日期:2014-05-20  浏览次数:20983 次

GridView中checkbox的问题
前台代码:
<asp:GridView ID="grdApprovalList" runat="server" Width="100%" CellPadding="4" ForeColor="#333333"
                        AllowSorting="true" AutoGenerateColumns="false" GridLines="None" Height="215px">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="选择">
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox" runat="server"/>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Applicant" HeaderText="姓名" />
                            <asp:BoundField DataField="DepartmentCode" HeaderText="部门编号" />
                            <asp:BoundField DataField="GroupCode" HeaderText="小组编号" />
                            <asp:BoundField DataField="LeaveType" HeaderText="假别" />
                            <asp:BoundField DataField="PlanedStartTime" HeaderText="开始时间" />
                            <asp:BoundField DataField="PlanedEndTime" HeaderText="结束时间" />
                            <asp:BoundField DataField="Reason" HeaderText="休假事由" />
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />