Error on Applying CSLA filter

Error on Applying CSLA filter

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


JSimoni posted on Friday, December 14, 2007

In my code, all of a sudden I am getting a weird "RemoveFilter not supported when Autofilter is true" error thrown by CSLA.  I basically have radio buttons on my form, and for each radiobutton, I handle the checkchanged event for that radiobutton and I apply a CSLA filter.

In this case, I am doing the following and the error is occuring on the second line of code:
And1.Filters.Remove("LandArea")
And1.Filters.Add("LandArea", New CSLA.Filters.DecimalInRangeComparer("LandArea", 0, (CType(_Home.LandArea, Decimal) * 3), True))

where the LandArea variable is declared as an INT32

where And1 is declared earlier in the code as :
Private And1 As CSLA.Filters.Sets.AndComparer
And1 = New CSLA.Filters.Sets.AndComparer

I've never had this problem before and I am finding the "Autofilter" is always set to true anyway which doesn't make sense that my other filters are working and this one is not.

I am referencing CSLA 1.5 in my code.  Can anyone please help me with this problem?

RockfordLhotka replied on Monday, December 17, 2007

You are referencing code that is not part of CSLA .NET, so you must have some code that is either custom or came from a community source.

If it came from a community source, hopefully the original contributor is on this list and can help you. If these alterations are home-grown you should find the person who made the alterations within your organization and see if they can help.

Copyright (c) Marimer LLC