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

  • Home
  • SEARCH
  • 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 6537161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:35:02+00:00 2026-05-25T10:35:02+00:00

I am working with a travel API. When a user search for hotels,I am

  • 0

I am working with a travel API. When a user search for hotels,I am populating a GridView by bringing in 20 hotels at a time with the API.

At the end of the gridview, I am planning to show a button, “show more”, when the user clicks that button, I want to call the API and bring more records and append them to the GridView’s current records. Show more buttons will be enabled until the API says no more records exist (most of the time 100+ records will exist)

What is the best way to achieve this?

I do not want to keep the old records in the session variable and pad to that.

Thanks

  • 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-05-25T10:35:03+00:00Added an answer on May 25, 2026 at 10:35 am

    You may use following kind of code….

    private void showMoreButton_Click(object sender, EventArgs e)
    {
        int i = 1;
        while(i <= numberOfRowsToDisplay)
        {
            dataGridView1.Rows.Add(yourDataStream[numberOfRowsDisplayed + i][0], yourDataStream[numberOfRowsDisplayed + i][1]);
            i++;
        }
        numberOfRowsDisplayed = numberOfRowsDisplayed + numberOfRowsToDisplay;        
    }
    

    You should fetch values from the data stream with regard to your API relevently…

    Hope this helps…

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

Sidebar

Related Questions

I'm working on a transportation model, and am about to do a travel time
I am working on a little card-swapping world-travel game that I sort of envision
I've been developing a travel planning site - tripgrep.com - which is built on
i'm working on iphone app which will show 4 buttons in first view. on
I am currently working on an Enquiry system for our travel website. When a
The url_helpers do not seem to be working in my User model during an
I am working on a large dataset which comprises travel behaviour data over a
I am working on a large dataset showing how people travel. I need to
I'm working on a travel site and am interested in adding some functionality so
Working with Paypal API is the worst experience so far for me as a

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.