• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 325
  • 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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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