My first post in CSLA (Filtered List)

My first post in CSLA (Filtered List)

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


c_shah posted on Wednesday, October 24, 2007

Using VB 2005 and CSLA 2.1

I created an editable root collection using CSLA generator , for some reason that collection can not be filtered (I thought .NET 2.0 has IBindingListView.Filter)

What do i need to do to enable filtering in my collection?

RockfordLhotka replied on Wednesday, October 24, 2007

CSLA includes FilteredBindingList, which provides a filtered view of any list. On CSLAcontrib there's an IBindingListView implementation you may choose to use instead.

McManus replied on Wednesday, October 24, 2007

The object from CSLAContrib is called ObjectListView. It supports sorting on multiple columns/properties and filtering.

Cheers,
Herman

Inquistive_Mind replied on Wednesday, October 24, 2007

Hello,

How can I use the ObjectListView in my project.I did download it long time back and used the DLL but was not able to use it.Is there an example or code that shows it being used to filter the List and bind the list back to the control?

Thanks In Advance

c_shah replied on Wednesday, October 24, 2007

I have similar question

My objects currently implements BusinessBase (of T) should i simply change it to  FilteredBindingList?

RockfordLhotka replied on Wednesday, October 24, 2007

No. BusinessBase creates single objects. BusinessListBase creates lists of BusinessBase objects. FilteredBindingList is a way to get a view of a BusinessListBase that is filtered.

 

Read the CSLA .NET Version 2.1 Handbook for details on how FilteredBindingList works and is used. In short:

 

Dim original As CustomerList(Of Customer)  ‘ where Customer is a BusinessBase(Of Customer)

original = CustomerList.GetList()

Dim filtered As New FilteredBindingList(Of Customer)(original)

filtered.ApplyFilter(…)

 

Now you can use ‘filtered’ as a binding source or whatever you want, and it provides a filtered view of ‘original’. The original list is still there, this is merely a filtered view.

 

Rocky

 

 

From: c_shah [mailto:cslanet@lhotka.net]
Sent: Wednesday, October 24, 2007 3:12 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] My first post in CSLA (Filtered List)

 

I have similar question

My objects currently implements BusinessBase (of T) should i simply change it to  FilteredBindingList?



c_shah replied on Wednesday, October 24, 2007

Awesome...lots of learning in my first post...

JoeFallon1 replied on Wednesday, October 24, 2007

Inquistive_Mind:

Hello,

How can I use the ObjectListView in my project.I did download it long time back and used the DLL but was not able to use it.Is there an example or code that shows it being used to filter the List and bind the list back to the control?

Thanks In Advance

Take a look at this thread:

http://forums.lhotka.net/forums/thread/10100.aspx

Joe

Copyright (c) Marimer LLC