Nov 8, 2015 at 2:49 PM
Edited Nov 8, 2015 at 3:42 PM
I'm creating a task service monitor that puts all of the root tasks into a datagrid and displays their information. I'm using a a binding source as taskservice.rootfolder.tasks and binding that to the datasource of a the datagrid. I'm having some issues
with the changes to tasks propagating to the datagridview. When an automated task is run the datagridview doesn't update the appropriate information until that row is clicked.
Am I missing a way to watch for change notifications? Has anyone else tried to implement this?
The point of this app is to show real time status for all tasks. If a task is running I would like to know immediately. Having the grid refresh every second might is too taxing resource wise. After having more than 15 tasks the whole program starts to lag the
Here is the code that I have. In a normal situation if I were using a dataset then dgv auto updates and repaints the new information.
Dim WithEvents _tskSrvc As TaskService = Nothing
Dim WithEvents _bSource As BindingSource = Nothing
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
_tskSrvc = New TaskService()
_bSource = New BindingSource
_bSource.DataSource = _tskSrvc.RootFolder.Tasks
_bSource.RaiseListChangedEvents = True
taskDGV2.DataSource = _bSource