Reputation: 619
In one of my winform I am trying to Populate data of employees days present days and absent days on a datagrid according to month and year select on combo box.
Once click on 'SHOW' button it takes sometime to populate, so I want to use progress bar at the bottom bar stating "List is being Populated"(like in Add or remove program in control panel). If theirs any other suggestions to make it work is most welcome.
Thanks
Upvotes: 0
Views: 596
Reputation: 28097
Take a look at BackgroundWorker.
You should also search before you ask questions, there are lots of similar questions on here that you could look at which may help you.
Upvotes: 2
Reputation: 37566
You can add a ProgressBar to a panel on your .NET StatusBar control by subclassing the StatusBar. Then you use the derived StatusBar on your WinForm just as you would use the standard control. See Example and article
You can try this Example too, sample code is offered to download.
Upvotes: 0
Reputation: 5224
You can use a BackgroundWorker thread to handle data population. This will give the user visual feedback while keeping the UI responsive. Look here: http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx.
Upvotes: 0