新建一个模版列:
<asp:TemplateField HeaderText="删除"> <ItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" OnClientClick='return confirm("确认要删除吗?")' Text="删除"></asp:LinkButton> </ItemTemplate> </asp:TemplateField>