I have a GridView which is like:
File Name DateTimeUploaded Type
Resume 1/13/2012 7:52:59 AM .docx Delete
tiger 1/18/2012 7:56:31 AM .docx Delete
Woods 1/18/2012 7:56:42 AM .xlsx Delete
tiger 1/18/2012 7:57:43 AM .xlsx Delete
In gridview_rowdeleting I have :
GridView1.DeleteRow(e.RowIndex);
GridView1.DataBind();
When I click on delete of second row which has tiger, the second and fourth rows get deleted. But I want to delete only the second row. How can I do this?
All depends on what you have defined as the DataKeyNames for the grid, if you are using the “File Name” then anything named Tiger in your example would get deleted.