If you are using GridView, On the Client Side it will render as HTML table only..
so using jquery u can remove the table row in client side..
please go through the following links to see how to remove in client side..
http://stackoverflow.com/questions/170997/what-is-the-best-way-to-remove-a-table-row-with-jquery[
^]
http://stackoverflow.com/questions/370013/jquery-delete-all-table-rows-except-first[
^]
http://stackoverflow.com/questions/16200104/jquery-add-and-remove-table-rows[
^]
try this sample code...
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="POC.WebForm2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<script src="jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#gv tr").click(function () {
$(this).remove();
});
});
</script>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:GridView ID="gv" runat="server">
</asp:GridView>
</form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
namespace POC
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack) { }
else
{
DataTable dt = new DataTable();
dt.Columns.Add("id", typeof(int));
dt.Columns.Add("value", typeof(string));
for (int i = 0; i < 20; i++)
dt.Rows.Add(i, "value---" + i);
gv.DataSource = dt;
gv.DataBind();
}
}
}
}