Update and Delete in Gridview

  • Replies:3
Manjula
  • Forum posts: 10

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
eSparkBiz
  • Forum posts: 107

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
jameselsworth30
  • 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
Manjula
  • Forum posts: 10

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

Hai jameselsworth30,

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

Helpful?
Reply