![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have several 'generations' of parent-child DataTable relations in my code, and was wondering how best to improve (fix) the following. When navigating through a parent table, I wan't to automatically update the child tables filters and displays. I've done this through the DataTable's BindingSource.CurrencyManager PositionChanged event. Within the event handler, I call out to child table delegate and to do the following. this.bindingSource.Filter = string.Format("{0} = {1}", idParentColumnName, idParentValue); this.bindingSource.MoveLast(); this.bindingSource.MoveFirst(); I have found however, that in order to propogate the filter updates through several 'generations' of parent-child relations, I need to call to programmatically change the position being displayed. Unless there is only one record in the DataTable, this code succesfully triggers the PositionChange event for child table. Is there a more clever way of doing this? - Jamie |
#3
| |||
| |||
|
|
I have several 'generations' of parent-child DataTable relations in my code, and was wondering how best to improve (fix) the following. When navigating through a parent table, I wan't to automatically update the child tables filters and displays. I've done this through the DataTable's BindingSource.CurrencyManager PositionChanged event. Within the event handler, I call out to child table delegate and to do the following. this.bindingSource.Filter = string.Format("{0} = {1}", idParentColumnName, idParentValue); this.bindingSource.MoveLast(); this.bindingSource.MoveFirst(); I have found however, that in order to propogate the filter updates through several 'generations' of parent-child relations, I need to call to programmatically change the position being displayed. Unless there is only one record in the DataTable, this code succesfully triggers the PositionChange event for child table. Is there a more clever way of doing this? - Jamie |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |