Update and Delete in Gridview

  • Replies:3
  • OpenNot stickiedUnanswered
  • Forum posts: 9

Jun 29, 2019, 8:26:23 AM via Website

Hai,

     Can anyone pls tell me how to update and delete a particular row in gridview?
Reply
  • Forum posts: 73

Jul 2, 2019, 8:29:22 AM via Website

For Delete Operation:

Remove.setOnClickListener(new View.OnClickListener() {
     @Override
     public void onClick(View v) {     

     StringLIST.remove(3);

     arrayadapter.notifyDataSetChanged();

     Toast.makeText(MainActivity.this,"Delete Successfully", Toast.LENGTH_SHORT).show();
     }
     });

For Update Operation:

StringLIST.get(0).setTitle("New Title");
arrayadapter.notifyDataSetChanged();
Helpful?
Reply
  • Forum posts: 11

Jul 3, 2019, 9:53:39 AM via Website

On which device do you want to update or delete a particular row, please confirm

Helpful?
Reply
  • Forum posts: 9

Jul 3, 2019, 4:57:32 PM via Website

Hai jameselsworth30,

— modified on Jul 7, 2019, 9:10:14 AM

Helpful?
Reply