M
Michael C
Hi all,
I have a listbox bound to a table in a database and a grid control bound to
another related table in the same database. When I select an item in the
listbox (in this case a name), the datagrid populates with the related
information correctly. Everything works fine to that point...
Now for the problem - I have to count the number of rows in the datagrid and
sum a column in the datagrid. I tried to do this on the listbox
..SelectedIndexChanged event. Problem is this event seems to fire before the
datagrid is updated - so my totals and row count are always one step behind
the user's listbox selection.
I've tried to find an event that I can use to trigger the total
calculations, but am having trouble. Is there an event I can use that fires
after the datagrid populates itself? Or maybe an event tied to the
datasource?
Thanks,
Michael C
I have a listbox bound to a table in a database and a grid control bound to
another related table in the same database. When I select an item in the
listbox (in this case a name), the datagrid populates with the related
information correctly. Everything works fine to that point...
Now for the problem - I have to count the number of rows in the datagrid and
sum a column in the datagrid. I tried to do this on the listbox
..SelectedIndexChanged event. Problem is this event seems to fire before the
datagrid is updated - so my totals and row count are always one step behind
the user's listbox selection.
I've tried to find an event that I can use to trigger the total
calculations, but am having trouble. Is there an event I can use that fires
after the datagrid populates itself? Or maybe an event tied to the
datasource?
Thanks,
Michael C