CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Refresh/Rebind CSLADataProvider

rated by 0 users
This post has 1 Reply | 0 Followers

Not Ranked
Posts 3
npatel Posted: Mon, Oct 12 2009 1:47 PM
I am attempting to pass a static resource to the CSLADataProvider as a factoryparameter using the following piece of XAML:

<UserControl.Resources>
<Common:FormatListFilterCriteria x:Key="FormatListFilterCriteriaObject" />

<csla:CslaDataProvider x:Key="FormatListProvider"
                               ObjectType="{x:Type Common:FormatList}"
                               FactoryMethod="GetFormatList"
                               IsAsynchronous="True"
                               DataChangedHandler="{StaticResource errDialog}"
                               IsInitialLoadEnabled="True" >
            <csla:CslaDataProvider.FactoryParameters>
                <StaticResource ResourceKey="FormatListFilterCriteriaObject" />
            </csla:CslaDataProvider.FactoryParameters>
        </csla:CslaDataProvider>
</UserControl.Resources>

I am using the Infragistics XamComboEditor to populate my FilterCriteria object in the following code:

<Grid DataContext="{StaticResource FormatListFilterCriteriaObject}">
<igEditor:XamComboEditor Name="cboItem"
                                             Grid.Column="1"
                                             Grid.Row="1"
                                             Theme="Office2k7Blue"
                                             Value="{Binding Path=ItemKey, BindsDirectlyToSource=True }" 
                                             HorizontalAlignment="Left"
                                             Height="21"
                                             VerticalAlignment="Top"
                                             Width="150"
                                             IsEditable="True">
                        <igEditor:XamComboEditor.ItemsProvider>
                             ...
                        </igEditor:XamComboEditor.ItemsProvider>
</igEditor:XamComboEditor>
</Grid>

The issue that I am having is that the FilterCriteria object has the correct property set, and looking at the data provider's FactoryParameter collection in debug, the correct data is set.  But, my Data property collection of the data provider is not refreshing.  At first thought, I thought that maybe by adding a .Refresh() or .ReBind() would force the dataprovider to refresh, but it didn't help.  Any thoughts?
Top 500 Contributor
Posts 22
Peer replied on Thu, Feb 18 2010 7:49 AM

Hi nPatel,

I had (have) exacly the same problem, I solved it by adding parameters to my factorymethod on the client object and  defining corresponding Factoryparameters in the dataprovider. This is only half the solution, I  still have to make those factoryparameters dynamic.

There is a new thread concerning this issue:

http://forums.lhotka.net/forums/t/8543.aspx

Peer

Page 1 of 1 (2 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems