Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

Datagrid for Visual Basic .NET

Using the automated methods eg:  Me.CustomersTableAdapter.Fill(Me.DsCustomers.Customers)

is there a way to find out when the the fill is finished  ?

 me.CustomersTableAdapter.filled ? :)

the reason for asking is to show a progress bar during the process.


0
siacom
Asked:
siacom
  • 3
  • 2
2 Solutions
 
doraiswamyCommented:
I'm going to give you an idea but not the code:
Start a separate thread. In this thread start a timer. Everytime the timer runs out, update the progress bar. The timer tick can be set to 100 or 1000 depending on how long your loading is expected to take. Note that since you do not know the exact time, your progress bar may reach maximum before the data set is loaded. In this case you have to restart the progress bar from 0.
0
 
siacomAuthor Commented:
thank you that answers part of it...

But at which point will the program know when the dataset is filled. ?
so that I can stop the timer.



0
 
doraiswamyCommented:
your fill command is of the form:

' start the timer here
dataadapter.fill(dataset)     ' this will take some time
' stop the timer here
0
 
doraiswamyCommented:
Thanks.
Let me know if it worked as you wanted it to.
0
 
siacomAuthor Commented:
A problem I have is that the progressbar stop even while the timer (thread) is running and then fills when the datagrid is filled.

I have tried so many scenarios placing the timer before the fill, filling within another thread. No matter what I try, there is always some sort of glitch to showing progress while filling.

At the moment I'm back to square one searching on the net for some answer to showing progress while filling a datagrid.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now