When i click on the button of grid view then that row will be hide........it never show again in gridview.....
aspx
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="3" ForeColor="#333333" GridLines="None"
CellSpacing="4" Width="92%" Visible="False" BorderColor="#DEBA84"
BackColor="#DEBA84" BorderStyle="None" BorderWidth="1px" AllowPaging="True"
onpageindexchanging="GridView1_PageIndexChanging" DataKeyNames="P_id"
onrowdatabound="GridView1_RowDataBound"
>
<columns>
<asp:BoundField HeaderText="Username" DataField="Uname" />
<asp:BoundField HeaderText="Product name" DataField="Product_name" />
<asp:BoundField HeaderText="Product Quantity" DataField="Product_quan" />
<asp:BoundField HeaderText="Delivery Date (MM/DD/YYYY)" DataField="Delivery_date" />
<asp:BoundField HeaderText="Extend Date (MM/DD/YYYY)" DataField="Extend_date" />
<asp:BoundField HeaderText="Product Information" DataField="check_bit" />
<asp:TemplateField>
<itemtemplate>
<asp:LinkButton ID="click" runat="server" Text="Dispatch">
</itemtemplate>
<asp:TemplateField>
<itemtemplate>
<asp:LinkButton ID="lnkbtn" runat="server" Text="InvDisp" ForeColor="Blue">
</itemtemplate>
</columns>
<footerstyle backcolor="#990000" font-bold="True" forecolor="White" />
<pagerstyle backcolor="#FFCC66" forecolor="#333333" horizontalalign="Center" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="White" BorderColor="#738A9C" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" Height="30%" />
<alternatingrowstyle backcolor="White" />
.cs
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView row = (DataRowView)e.Row.DataItem;
string eid = ((LinkButton)e.Row.FindControl("click")).Text;
string lnkbtn = ((LinkButton)e.Row.FindControl("lnkbtn")).Text;
string param = "challan_report.aspx?P_id=" + row["P_id"] + "&Uname=" + row["Uname"];
((LinkButton)e.Row.FindControl("click")).Attributes.Add("OnClick", "window.open('" + param + "','PopupWindow','toolbar=no, location=no, directories=no,titlebar=no, status=no, menubar=no,resizable=NO,scrollbars=NO,copyhistory=no,width=600,height=600,top=20,left=20')");
string caram = "Invoice.aspx?P_id=" + row["P_id"] + "&Uname=" + row["Uname"];
((LinkButton)e.Row.FindControl("lnkbtn")).Attributes.Add("OnClick", "window.open('" + caram + "','PopupWindow','toolbar=no, location=no, directories=no,titlebar=no, status=no, menubar=no,resizable=NO,scrollbars=NO,copyhistory=no,width=600,height=600,top=20,left=20')");
}
}