WPF DataGrid that works properly with databinding and CSLA

WPF DataGrid that works properly with databinding and CSLA

Old forum URL: forums.lhotka.net/forums/t/12108.aspx

Russ posted on Friday, August 09, 2013

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

Russ replied on Tuesday, August 27, 2013

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.





RockfordLhotka replied on Tuesday, August 27, 2013

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.

Copyright (c) Marimer LLC