我有gridview,我对gridview 行的asp.net 编辑、删除、更新命令不是很专家。这里我想通过单击编辑模式将gridview行模式更改为编辑。但是当我单击编辑按钮时它什么也不做。有人可以检查出什么问题吗?
<asp:GridView ID="GridViewTopics" runat="server" AutoGenerateColumns="False" DataKeyNames="Id"
GridLines="Horizontal" OnRowEditing="GridViewTopics_RowEditing" CssClass="gridstyle"
Style="margin-left: 30px;" Width="230px">
<Columns>
<asp:TemplateField HeaderText="Topics">
<ItemTemplate>
<table>
<tr>
<td>
<div>
<asp:Label ID="LabelTopicName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
</div>
</td>
<td valign="top" align="right" >
<div>
<asp:LinkButton ID="LinkButtonEdit" runat="server" Text="Edit" CommandName="Edit"></asp:LinkButton>
</div>
</td>
</tr>
</table>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBoxEditTopicName" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
<asp:LinkButton ID="LinkButtonUpdate" runat="server" CausesValidation="True" CommandName="Update"
Text="Update"></asp:LinkButton>
<asp:LinkButton ID="LinkButtonCancel" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel"></asp:LinkButton>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="headerclass" />
</asp:GridView>