EntityView2.Filter ArgumentOutOfRangeException

Posts   
 
    
arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 29-May-2006 18:42:59   

If I filter an occurance of this view on a value it doesn't contain with a


FieldCompareValuePredicate(field, null, ComparisonOperator.Equal,dc.FilterText);

I get an ArgumentOutOfRangeException instead of an empty EntityView2.

Is this correct?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 29-May-2006 19:16:45   

No, getting an exception isn't correct simple_smile . Please post more info about the view and above all: the stacktrace. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 29-May-2006 19:55:41   

Stack Trace:


A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
   at System.Collections.ArrayList.get_Item(Int32 index)
   at C1.Win.C1TrueDBGrid.BaseGrid.ViewRowList.get_Item(Int32 index)
   at cq.n(Int32 A_0)
   at cc.b(Int32 A_0)
   at C1.Win.C1TrueDBGrid.BaseGrid.Frame.Reset(Boolean setpos)
   at C1.Win.C1TrueDBGrid.C1TrueDBGrid.Reset(Boolean setpos)
   at C1.Win.C1TrueDBGrid.BaseGrid.Frame.b(Object A_0, ListChangedEventArgs A_1)
   at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)
   at SD.LLBLGen.Pro.ORMSupportClasses.EntityViewBase`1.OnListChanged(Int32 index, ListChangedType typeOfChange)
   at SD.LLBLGen.Pro.ORMSupportClasses.EntityViewBase`1.set_Filter(IPredicate value)
   at Cgm.Forklift.UserLayer.FormMain.gridInvoices_FilterChange(Object sender, EventArgs e) in C:\Documents and Settings\arschr\My Documents\Visual Studio 2005\Projects\CGM\InvoiceRegister\Cgm.Forklift.UserLayer\FormMain.cs:line 82

It's an int column, the view has values 2,21,2190 but not 219. As each digit is entered a new filter is built on the entity view. It blows on the 219 filter.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 29-May-2006 20:34:32   

The exception is in the componentone grid, not in my code. Please see the stacktrace: after the reset event, it crashes in an arraylist getitem call which is internal in the grid code.

Frans Bouma | Lead developer LLBLGen Pro
arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 29-May-2006 21:42:10   

I'll test it with a bare EntityView and report the exception to them if that passes.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 29-May-2006 22:21:19   

arschr wrote:

I'll test it with a bare EntityView and report the exception to them if that passes.

You mean gridview? wink

Frans Bouma | Lead developer LLBLGen Pro
arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 30-May-2006 12:26:10   

No, I'll test it with a entityview that's not bound to anything.

I can also try it bound to other grids. I know the C1Grid doesn't raise this exception when bound to a datview filtered to have no members.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 30-May-2006 12:43:56   

Please replace the grid with a vanilla gridview to see if it crashes then as well. As the code dies inside the grid (at least that's what it looks like according to the stacktrace) it's unlikely my code, but you'll never know.

Also, it could be componentone has an updated grid now. As the code shows, the crash is inside an arraylist using piece of code. Wouldn't they have a .NET 2.0 version of their grid?

Frans Bouma | Lead developer LLBLGen Pro
arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 30-May-2006 12:46:30   

Please replace the grid with a vanilla gridview to see if it crashes then as well. As the code dies inside the grid (at least that's what it looks like according to the stacktrace) it's unlikely my code, but you'll never know.

O.k.

Also, it could be componentone has an updated grid now. As the code shows, the crash is inside an arraylist using piece of code. Wouldn't they have a .NET 2.0 version of their grid?

Yes, sadly this is it. rage