DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 25 Jul 2007 13:36:38 -0400,    posted on: microsoft.public.dotnet.framework.windowsforms.databinding        back       

Thread Index
  1    Jamie Risk risk.#
          2    Rick Mogstad
          3    Rick Mogstad


BindingSource and currency management event question...   
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
Date:Wed, 25 Jul 2007 13:36:38 -0400   Author:  

Re: BindingSource and currency management event question...   
Using the CurrentChanged event.


"Jamie Risk" <risk.#.@intectus.com> wrote in message 
news:O3M8bJuzHHA.4276@TK2MSFTNGP05.phx.gbl...

>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 
Date:Wed, 15 Aug 2007 10:46:00 -0700   Author:  

Re: BindingSource and currency management event question...   
Using the CurrentChanged event.


"Jamie Risk" <risk.#.@intectus.com> wrote in message 
news:O3M8bJuzHHA.4276@TK2MSFTNGP05.phx.gbl...

>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 
Date:Wed, 15 Aug 2007 10:46:00 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us