September 21st, 2003, 09:17 PM
deleting a record from a listview
I have a listview called listview1. It populates just fine. I can refresh the listview everytime I add a record.
My question is, how do I delete a record from the listview? I would like to be able to select the row in the listview and delete it.
Sorry if I am not as specific as I need to be, but I'm not sure where to start.
Thank you for any help in this endeavour.
September 23rd, 2003, 03:23 PM
you just want to remove one item from the listview ?
the # is the item in the list you want to remove starting from 0
I believe you would like to remove the item that is selected from the user in the list then
or something similar to that depending on your needs etc...
September 24th, 2003, 08:18 PM
removing an item from a Listview
Thanks for the reply and it works. I guess I should have been a little more specific. Not only do I need it to be removed from the listview, but I also need it to be removed from the database permanently.
Do I need to call the database and update or use indices in my table?
September 24th, 2003, 08:35 PM
yeah if you want to be removed from your Database you will have to call it !
there is different way to do it ! I also asked wich one is the fastest etc... but haven't got answer yet.
You can do a dataset and datarow and go delete it. I think it's not the best way and I got some problem if I delete more then 2, don't know why. Never got the problem with Vb6.
Imo the best way is to use a Request to do it ! and just connect to your database and then start your request and it will be deleted permantly.
one thing you could do is just to remove the item from your database and reload your listview ?