Click here to Skip to main content
15,912,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please refer this link


http://geekswithblogs.net/dotNETvinz/archive/2009/02/22/gridview-multiple-delete-with-checkbox-and-confirm.aspx[^]

i tried similar to this it works all fine
but when i make bound field id to visible="false"
id is getting blank while delete functionality
how can i achieve this
Posted
Updated 17-Nov-11 21:07pm
v2
Comments
Al Moje 18-Nov-11 3:34am    
Making field id to visible="false" surely return an output id into blank...

1 solution

Hi,

Try this:

In you client code (Example):
C#
<itemtemplate>
   <asp:LinkButton ID="glnkDelete" runat="server" Text="Delete"
       Width="100%" OnClick="glnkDelete_Click"
       OnClientClick="return confirm('Are you certain you want to delete this reimbursement entry');" >

</itemtemplate>


In you code behind (example):
   protected void glnkDelete_Click(object sender, EventArgs e)
{
    LinkButton glnkDelete = sender as LinkButton;
    GridViewRow row = (GridViewRow)glnkDelete.NamingContainer;
    string claimNo = row.Cells[5].Text.Trim();
    // You code for deletion here...
    // ....
    // upGridClaims.Update();   sample update you grid...
}


Hope this could help...

Regards,
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900