这是我的网站表单 my form
,当我单击以编辑链接按钮时,添加链接按钮可见 edit picture
这是我的表单代码
<asp:TemplateField HeaderStyle-Width="50px">
<ItemTemplate>
<asp:LinkButton ID="link_edit" runat="server" CommandName="edit" ToolTip="edit" Text="<span class='table-icons'><i class='fas fa-edit'></i></span>" style="width:20px"></asp:LinkButton>
<asp:LinkButton ID="link_delete" runat="server" CommandName="delete" ToolTip="delete" Text="<span class='table-icons'><i class='fas fa-times'></i></span>" style="width:20px;" OnClientClick="return confirm('Are you sure you want to delete this record?');"></asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
<asp:LinkButton ID="link_update" runat="server" CommandName="Update" ToolTip="Update" Text="<span class='table-icons'><i class='far fa-save'></i></span>" style="width:20px;"></asp:LinkButton>
<asp:LinkButton ID="link_cancel" runat="server" CommandName="Cancel" ToolTip="cancel" Text="<span class='table-icons'><i class='fas fa-times'></i></span>" style="width:20px;"></asp:LinkButton>
</EditItemTemplate>
<HeaderTemplate>
<label style="color: #3366FF">Action</label>
<asp:LinkButton ID="link_add" runat="server" ValidationGroup="company_country" CausesValidation="true" CommandName="addnew" ToolTip="addnew" Text="<span class='table-icons' style='font-size:15pt;'><i class='far fa-save'></i></span>"></asp:LinkButton>
</HeaderTemplate>
</asp:TemplateField>
这是我要定义的函数invisible = false
protected void GridView_cause_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView_cause.EditIndex = e.NewEditIndex;
PARAM_CAUSE_DEPARTURE_DAO cause = new PARAM_CAUSE_DEPARTURE_DAO(this._sSqlConnectionString);
display_cause();
cause.edit(GridView_cause);
display_cause_form();
}
请帮助我