CSLA and filter/sorting in ComponentOne C1DataGrid

CSLA and filter/sorting in ComponentOne C1DataGrid

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


Imker posted on Wednesday, March 03, 2010

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" />

RockfordLhotka replied on Wednesday, March 03, 2010

There's an item in the FAQ about sorting CSLA lists in WPF:

http://www.lhotka.net/cslanet/faq/WPFFaq.ashx

Imker replied on Wednesday, March 03, 2010

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.

 

WikipediaWictionaryChambers (UK)Google imagesGoogle defineThe Free DictionaryJoin exampleWordNetGoogleUrban DictionaryAnswers.comrhymezone.comMerriam-Webster<>0
wvcidfjoguarm

RockfordLhotka replied on Wednesday, March 03, 2010

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!

ajj3085 replied on Wednesday, March 03, 2010

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