You can pass the custID as int to the deletecustomer function and delete the record having custID.
After the function call, you can reload/refresh the listview, in the button1_click().
public void Deletecustomer(int CustID)
{
CustomerDataContext db = new CustomerDataContext();
Table<customerdetails> tblCustomerDetails = db.Gettable<customerdetails>();
CustomerDetails selectedCustomer = (CustomerDetails)tblCustomerDetails.Select(c=>c.custID == CustID);
db.tblCustomerDetails.DeleteOnSubmit(selectedCustomer);
db.SubmitChanges();
}
Does this help you?
Regards
Swami