When using virtually any collection as Itemssource for a C1DataGrid
I get filtering and sorting from the C1DataGrid. When using the
CslaDataProvider with a BusinessListBase I can not sort or filter the grid.
The data and all the columns show up as expected, but no filtering, no sorting.
Why?
As a beginner in CSLA I build a minimal
BusinessObject
Resource : BusinessBase<Resource>
and a list of
Resources : BusinessListBase<Resources, Resource>
then in XAML using the CslaDataProvider
<csla:CslaDataProvider x:Key="ResourceList"
ObjectType="{x:Type business:Resources}"
FactoryMethod="GetResourceList"
IsAsynchronous="True"/>
and later, using it with:
<c1grid:C1DataGrid
Name="c1DataGrid1"
ItemsSource="{Binding}"
AllowSort="True"
xmlns:c1grid="http://schemas.componentone.com/wpf/C1DataGrid" />
There's an item in the FAQ about sorting CSLA lists in WPF:
Hi Rocky, wow that was fast.
I read that ObservableCollection will come with CSLA 4.
I don't need the Winforms support so can I already use the CSLA 4 preview?
It's my first CSLA Project and it's a small one in WPF.
Greetings from Switzerland.
I wouldn't recommend using the CSLA 4 preview for anything real - at least not unless you have a high tolerance for troubleshooting. It is a preview, not a beta!
I believe this is because Wpf doesn't fully support BindingList, and that's what Csla lists subclass from. This will change in Csla 4, so it will work as you expect. I think you can use Linq to Csla as a workaround in the meantime though.
Copyright (c) Marimer LLC