给gridview加一个TemplateField ,然后在里面加个按钮:LinkButton ,在给GridView加一个事件 OnRowCommand="GridView1_RowCommand"
前台:
                            <asp:TemplateField HeaderText="删除">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick='return confirm("确认要删除吗?")'
                                        CommandArgument='<%# Eval("ProtypechilID") %>' CommandName="delrow" ForeColor="maroon">删除小类</asp:LinkButton>
                                </ItemTemplate>                            </asp:TemplateField>
后台:
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "delrow")
        {
//可以写删除的操作
        }
    }