Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a doubt here, and I need your help

I have a aspx page and in that page am collecting the information form the users and am storing the information to the list, and I bind the list to the gridview as its datasource...

my question is how can we delete the rows in the gridview, whose datasource is list, not the database
Posted

Have you tried searching in this website? There are plenty of answers to this kind of question. See the following:

delete a row in grid[^]
gridview row deleting asp.net[^]
deleting records in gridview[^]

If those are not enough, you can check the search results from Codeproject[^] and Google[^].
 
Share this answer
 
Comments
abdul samathu 9-Mar-12 0:57am    
thanks walterhevedeich, i got the solution
walterhevedeich 9-Mar-12 4:24am    
If you got it the solution from my answer, you might want to click accept solution. :)
The way you delete a row in a gridview that has a source of a List is to use the Remove method of the List class. That is done with the list.Remove(objectToBeRemoved) or list.RemoveAt(objectToBeRemoveIndex). I am not an ASP.Net developer, but WPF, so I may not be on the right track.
 
Share this answer
 

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