Curious what object support Filtering and Sorting in CSLA

Curious what object support Filtering and Sorting in CSLA

Old forum URL:

cwinkelmann posted on Monday, January 16, 2012

I've noticed CSLA does not support IBindingListView which is unfortunate. I have seen a piece of code called ObjectFilteredList.cs on the net but It seems a bit old and is not part of any supported code base like CSLA and also I've checked CSLAcontrib and no such code is included there. In fact the contrib download is only 29k zipped which is not a lot of code. Seems only an extension of the DataPortal or a Proxy. (sorry, haven't looked too hard there)...

Anyway, I was wondering if anyone has some advice on what is the best implementation for a filtered list... My specific application is for a set of combo boxes in a form and a similar set in a datagridview to be chained... Select the country, the second combo box only contains valid states in the country. Select a state and the third only contains valid cities in that state.

Can be used for any other application but this is my current example.

I have done this before with DataTables and a DataView, but having converted over much of my program to CSLA and now using ReadOnlyListBase and ReadOnlyBase, I don't want to have to provide a conversion or copy that data only for this one off issue...

Thanks greatly to all those who share CSLA.Net !!!

JonnyBee replied on Monday, January 16, 2012


The CSLA Contrib project is more like a contribution of code and samples so you should download the latest source code from repository.

For the BindingList based classes you should use FilteredBindingList.

For the ObservableCollection based classes you should use linq queries with the ToSyncList() extension method.
The ToSyncList will return an instance of LinqObservableCollection that will attach itself to the underlying list to keep in sync (much like FilteredBindingList does for BindingList deratives).

Copyright (c) Marimer LLC