title: How to delete selected item in a ListView android xamarin
body: <p>How to delete selected items in a ListView,The Items of ListView are from SQLite.net Database
  below is my code but when i delete all row and add new item to db ,i can not delete a row from listview </p>
  
  <pre><code>private void popmenu(object sender, AdapterView.ItemClickEventArgs e)
      {
          var menu = new PopupMenu(this, listnames.GetChildAt(e.Position));
          menu.Inflate(Resource.Layout.popup_menu);
          menu.MenuItemClick += (s, A) =&gt;
          {
              switch (A.Item.ItemId)
              {
                  case Resource.Id.pop_button1:
                      // update stuff
                      string dpPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "user.db3");
                      db = new SQLiteConnection(dpPath);
                      var data = db.Table&lt;LoginTable&gt;();
                      // Toast.MakeText(this, "row:" + (e.Position+1), ToastLength.Short).Show();
                      int ww =(e.Position + 1);
                      var data1 = data.Where(x =&gt; x.id == ww);
                      foreach (var item in data1)
                      {
                          db.Delete(item);
  
                          Toast.MakeText(this, "Delete Successfully", ToastLength.Short).Show();
                      }
  
                          break;
  
              }
          };
  </code></pre>