Solved

Datagrid for Visual Basic .NET

Posted on 2007-11-18
5
317 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
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…

860 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