Gridview的rowupdating事件无法触发。
前台代码:
<asp:GridView ID="GVrota" runat="server" AllowSorting="True" AutoGenerateColumns="False" GridLines="None" DataKeyNames="id0" CellPadding="5" OnRowCancelingEdit="GVrota_RowCancelingEdit" OnRowEditing="GVrota_RowEditing" OnRowUpdating="GVrota_RowUpdating">
<EmptyDataTemplate>
数据库连接故障<br />
</EmptyDataTemplate>
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:TemplateField HeaderText="日期">
<HeaderStyle HorizontalAlign="Left" />
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("日期") %>' Width="80px"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="星期">
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("星期") %>' Width="20px"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="公司领导">
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("公司领导") %>' Width="60px"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("公司领导") %>'></asp:TextBox>
</EditItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="值班人员">
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("值班人员") %>' Width="60px"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("值班人员") %>'></asp:TextBox>
</EditItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="备注">
<HeaderStyle HorizontalAlign="Left" />
<ItemTemplate>
<