Solved

Datagrid for Visual Basic .NET

Posted on 2007-11-18
5
315 Views
Last Modified: 2013-11-26
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
Comment
Question by:siacom
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
doraiswamy earned 500 total points
ID: 20310698
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
 

Author Comment

by:siacom
ID: 20317038
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
 
LVL 8

Assisted Solution

by:doraiswamy
doraiswamy earned 500 total points
ID: 20318291
your fill command is of the form:

' start the timer here
dataadapter.fill(dataset)     ' this will take some time
' stop the timer here
0
 
LVL 8

Expert Comment

by:doraiswamy
ID: 20326176
Thanks.
Let me know if it worked as you wanted it to.
0
 

Author Comment

by:siacom
ID: 20331339
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question