I
have an app that shows the time it takes to execute a search, much like
SQL Management Studio, but the app behaves as though the
System.Windows.Forms.Timer gets blocked while binding the results to
the FlexGrid. The search runs in the background,
but I have to return to the UI thread to bind the results. I turned on tracing and am pretty confident the Timer.Tick event never fires while binding the FlexGrid, even if it takes 10 seconds to bind and Timer.Interval == 1000.
I tried using a System.Timers.Timer to increment the elapsed time on a background thread. This works great, but I have to Invoke back to the UI thread if I am to update the status bar like SQL Management Studio. Each call to Invoke, however, gets blocked just like before. Now, the elapsed seconds jumps up to the correct time, but does not update while databinding.
Is there anyway to update the UI while databinding a FlexGrid?