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 8408201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:34:08+00:00 2026-06-09T23:34:08+00:00

I have a Datagridview that contains few columns and data in each row. I

  • 0

I have a Datagridview that contains few columns and data in each row. I need to regularly send complete Datagridview data, each row data one at a time, sequentially to a web browser in my application, which will actually append this row data to a URL of a website that will echo whatever data is appended to it. So for this purpose I used a timer which will send all the data once for every 10 seconds. Inside the timer to send each row one at a time I used the following for loop:

private void tmr_senddata_Tick(object sender, EventArgs e)
{
    if(dg_parameters.Rows.Count!=1)
    {
        for (int i = 0; i < dg_parameters.Rows.Count-1; i++)
        {
            string row = "";
            string cell = "";
            for (int j = 0; j < dg_parameters.Columns.Count; j++)
            {
                cell = cell + dg_parameters.Rows[i].Cells[j].Value;
                cell = cell + "@";
                row = cell;
            }
            string uri = webBrowser1.Url + row;
            webBrowser1.Navigate(uri);
        }
    }
}

Now what I end up is only the last row being displayed on the browser. This is because by the time my browser navigates to the URL specified for the first time in my loop, next iteration takes and URL changes. So only my last row data is navigated properly and displayed on browser. How do I stop the for loop for a specified time every time so that I can see my browser navigate to the URL. I believe Thread.Sleep() is not a good idea because it blocks my UI thread.

UPDATE: This is a simulation application used to test a particular scenario. So please ignore the reason in doing this. A solution to the problem will do good.

  • 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-09T23:34:10+00:00Added an answer on June 9, 2026 at 11:34 pm

    Put your dg_parameters.Rows in a Queue when your application starts.

    Each time the timer fires, call myQueue.Dequeue to get the next item to use.

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

Sidebar

Related Questions

I have a DataSet that contains a few columns. One of these columns is
I have a form that contains dataGridView, whose coloumn are set to dgrv1.Width =dgrv1.Columns.GetColumnsWidth(DataGridViewElementStates.Visible)+20;
I have a Datagridview in my C# program that contain numeric data. I need
I have a DataGridView with unbound data that contains three different DataColumns . The
I have a DataGridView with cells from a database file that contains data. Basically,
I have a DataGridView that contains 13 columns. Most of the rows are completely
I have a DataGridView that's bound to a DataSet. It has columns DateCreated, Weight,
I have a DataGridView that I would like all values on a specific row
Ok, I have a DataGridView that I'd like to load with data that I'm
I have a virtual datagridview that I want to set varying row heights for.

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.