you just aren't removing the item from the original collection.
this is what you need to do, modify the code that adds the new items to the listview to store a reference to the myObject instance in its Tag property. then on your code that removes the item from the istview, first remove the item stored in its tag from your List<myObject> collection.
Its really very simple. I don't undertand why you are having a problem. I am going to show you some example code, this code is NOT just paste in code for your application. I am just going to show you HOW its done with a different example.
//this method will add new item to both your listview and the datalist that holds the data to be saved
public void addItem(ListView listViewToAddTo, List<someObject> listThatHoldsData, string Col1, string Col2)
{
//create the listview item to display it in the listview
ListViewItem newItem = new ListViewItem(Col1);
newItem.SubItems.Add(Col2);
//create the dataobject that holds the information
someObject newSomeObject = new someObject();
newSomeObject.Column1 = Col1;
newSomeObject.Column2 = Col2;
//add the data object to the main list
listThatHoldsData.Add(newSomeObject);
//set the data object reference to the tag object of the lsitview item that way we can find it easy
newItem.Tag = newSomeObject;
//finally add that item to the listview
listViewToAddTo.Items.Add(newItem);
}
public void removeItem(ListView listViewToRemoveFrom, List<someObject> listThatHoldsData)
{
//get the selected item
ListViewItem selecteditem = listViewToRemoveFrom.SelectedItems[0];
//get the original object, stored as a reference in the selecteditem's tag
someObject selectedObject = (someObject)selecteditem.Tag; …