How to Delete row using context menu?

view story

http://stackoverflow.com – Please let me know how to delete list item and get updated list using onContextItemSelected??? Please suggest. Code: case R.id.Delete_Note: Database_Notepad db=new Database_Notepad(Create_Task.this); db.DeleteNote(); break; My Database: public void DeleteNote(int rowId) { SQLiteDatabase db = this.getWritableDatabase(); db.delete(Table_Notepad, Col_ID + " = ?", new String[] { String.valueOf(rowId) }); db.close(); } How to delete row using context menu??? (HowTos)