CSLA .NET

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

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • WPF DataGrid that works properly with databinding and CSLA

    Answered (Verified) This post has 1 verified answer | 2 Replies | 2 Followers

    Top 100 Contributor
    77 Posts
    Russ Blair posted on Fri, Aug 9 2013 4:56 PM

    Has anyone been able to find a datagrid for WPF that correctly implements data binding and works properly with CSLA?

    Answered (Verified) Verified Answer

    Top 100 Contributor
    77 Posts
    Verified by RockfordLhotka

    I thought I would share my findings with the group in case someone else has a similar issue.

    We were trying to update an older WPF application that used CSLADataProvider. The app needed a data grid for quick entry. We tried several data grids but they all failed to bind a modified row to the newly returned business object resulting in an error when the row was subsequently changed.

    We created a prototype WPF application specifically for the purpose of testing data grids. We used CSLA 4.5.30, Caliburn.Micro 1.5.1 and CSLA Contrib all installed with NuGet. We created a repository similar to the one Rocky created in his CslaMVC sample and added a PersonDRL and PersonDR class. We created a PersonList view model, PersonInfo view model and PersonList View and we created an observable collection in our PersonList view model to load the PersonInfo view models. The stage was set.

    WPF Toolkit - February 2010 Release

    ·         Failed to bind row to newly returned business object after saving

     

    Extended WPF Toolkit™ Community Edition

    ·         Worked! – modified rows where successfully bound to the newly returned BO after saving.

     

    Conclusion: The Extended WPF Toolkit™ Community Edition data grid does work with CSLA using the MVVM pattern but not with the old CSLADataProvider.

     

     

     

     

    All Replies

    Top 100 Contributor
    77 Posts
    Verified by RockfordLhotka

    I thought I would share my findings with the group in case someone else has a similar issue.

    We were trying to update an older WPF application that used CSLADataProvider. The app needed a data grid for quick entry. We tried several data grids but they all failed to bind a modified row to the newly returned business object resulting in an error when the row was subsequently changed.

    We created a prototype WPF application specifically for the purpose of testing data grids. We used CSLA 4.5.30, Caliburn.Micro 1.5.1 and CSLA Contrib all installed with NuGet. We created a repository similar to the one Rocky created in his CslaMVC sample and added a PersonDRL and PersonDR class. We created a PersonList view model, PersonInfo view model and PersonList View and we created an observable collection in our PersonList view model to load the PersonInfo view models. The stage was set.

    WPF Toolkit - February 2010 Release

    ·         Failed to bind row to newly returned business object after saving

     

    Extended WPF Toolkit™ Community Edition

    ·         Worked! – modified rows where successfully bound to the newly returned BO after saving.

     

    Conclusion: The Extended WPF Toolkit™ Community Edition data grid does work with CSLA using the MVVM pattern but not with the old CSLADataProvider.

     

     

     

     

    Top 10 Contributor
    9,475 Posts

    fwiw, Microsoft deprecated the whole data provider concept several years ago, so it doesn't surprise me that the model doesn't work with any modern UI components.

    The only reason CslaDataProvider still exists is for backward compatibility - for people who have old WPF code presumably using UI components from that same era.

    Rocky

    Page 1 of 1 (3 items) | RSS

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