有一段代码:
<td valign="top" align="right">
<asp:DataGrid ID="dgPendingApplications" runat="server" Width="800px" AllowSorting="True" AutoGenerateColumns="False" OnSelectedIndexChanged="dgPendingApplications_SelectedIndexChanged">
<SelectedItemStyle BackColor="LawnGreen"></SelectedItemStyle>
<AlternatingItemStyle BackColor="#FBFAE6"></AlternatingItemStyle>
<HeaderStyle Wrap="true" HorizontalAlign="Center" CssClass="lbl_bold" BackColor="#CCCC00"></HeaderStyle>
<Columns>
asp:TemplateColumn
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:CheckBox ID="chkbox" runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="name_primaryinsured" SortExpression="name_primaryinsured" ReadOnly="True" HeaderText="Primary Insured">
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" CssClass="cell_normal"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="applicationNO" SortExpression="applicationNO" HeaderText="Application No" ReadOnly="True">
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" CssClass="cell_normal"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="crdate" SortExpression="crdate" ReadOnly="True" HeaderText="Date Created" DataFormatString="{0:MM/dd/yyyy}">
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" CssClass="cell_normal"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="address" SortExpression="address" ReadOnly="True" HeaderText="Property Location">
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" CssClass="cell_normal"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="StatusCode" SortExpression="StatusCode" ReadOnly="True" HeaderText="Status">
<HeaderStyle HorizontalAlign="Left"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" CssClass="cell_normal"></ItemStyle>
</asp:BoundColumn>
asp:TemplateColumn
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="lnkbSelect" CssClass="body" runat="server" CommandName='<%# DataBinder.Eval(Container.DataItem, "StatusCode") %>' CommandArgument='<%# DataBinder.Eval(Container.DataItem, "InsfrontFpApplication") %>' title='<%# DataBinder.Eval(Container.DataItem, "InsfrontFpApplication") %>'>EDIT</asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
asp:TemplateColumn
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="lnkbCopy" CssClass="body" runat="server">Copy</asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid></td>
但是 <asp:CheckBox ID="chkbox" runat="server"></asp:CheckBox> 没起作用:
请问是什么原因?
解决了,后端控制。