Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7903597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:47:05+00:00 2026-06-03T09:47:05+00:00

I am having a grid view ,I am passing data which I want to

  • 0

I am having a grid view ,I am passing data which I want to display in grid view to the gridview adaptor class.Now I want to remove the item when an item is long pressed.

I want to delete in onItemLongClickListener .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:47:07+00:00Added an answer on June 3, 2026 at 9:47 am

    What you need to do is this:

    1. Create a custom adapter for your GridView. In that adapter, provide a method for removing an item from the list of items it maintains, for example ‘void removeItem(int position)`

    2. Call setOnItemLongClickListener to your grid. In this method, you get the position of the item that the long click occurred on. From this method, call the method to remove the item with the position you just received.

    3. Notify the GridView that the data has changed using notifyDataSetchanged method. If you want the GridView UI to update immediately, you need to use Handler for this request to make sure it happens on the UI thread.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to export my data from grid view to the excel. Unfortunately i
Grid View Data Bind i have a database table with 4 columns having data
i am having a concept like i want to use grid view inside another
In my c# form I have a data grid view where I want to
I'm having a small problem. I have this grid with a column: <data:DataGrid ColumnHeaderStyle={StaticResource
In our application, we are having various windows which contain grid and their respective
Consider a web page having grid-view connected to SqlDataSource having all permission to insert
I am having a GridView in my page , I want that when a
I have an issue with having a asp.net Grid View loaded into a div
I am having trouble handling the selections in DataGridView . My grid view contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.