c# - Event for SQLcommand finished -
is there event tell me when sql query has finished. populating table view using following code.
cmd = new sqlcommand(mainwindow.product.query, cliconnect); sqldataadapter sda = new sqldataadapter(cmd); sda.fill(mainwindow.product.dt); the reason want because want have waiting screen has animations playing while user waits there query. of them take minute.
so need event let me know when switch next wpf page , populate datagrid data table
use backgroundworker class data. fire off runworkercompleted event when done. while running, play animation.
http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker(v=vs.110).aspx
Comments
Post a Comment