I'm running into a strange situation with one of my grids. When I apply a filter to the first column (a string), the PerformFiltering method throws an "Object reference not set to an instance of an object" error. The strange part about this is that I have another grid that is set up almost exactly like this one and it is not throwing this error. Both are using URLAdaptor, both have mixed-type data (strings and decimals).
The Where[0] object in the grid that works is:
Where Count = 1 System.Collections.Generic.List<Syncfusion.EJ2.Base.WhereFilter>
[0] {Syncfusion.EJ2.Base.WhereFilter} Syncfusion.EJ2.Base.WhereFilter
Condition "and" string
Field null string
IgnoreCase false bool
IsComplex true bool
Operator null string
predicates Count = 1 System.Collections.Generic.List<Syncfusion.EJ2.Base.WhereFilter>
[0] {Syncfusion.EJ2.Base.WhereFilter} Syncfusion.EJ2.Base.WhereFilter
Condition null string
Field "SKU" string
IgnoreCase true bool
IsComplex false bool
Operator "startswith" string
predicates null System.Collections.Generic.List<Syncfusion.EJ2.Base.WhereFilter>
value "FBA_" object {string}
value null object
The Where[0] object for the one that doesn't work is:
Where Count = 1 System.Collections.Generic.List<Syncfusion.EJ2.Base.WhereFilter>
[0] {Syncfusion.EJ2.Base.WhereFilter} Syncfusion.EJ2.Base.WhereFilter
Condition "and" string
Field null string
IgnoreCase false bool
IsComplex true bool
Operator null string
predicates Count = 1 System.Collections.Generic.List<Syncfusion.EJ2.Base.WhereFilter>
[0] {Syncfusion.EJ2.Base.WhereFilter} Syncfusion.EJ2.Base.WhereFilter
Condition null string
Field "SKU" string
IgnoreCase true bool
IsComplex false bool
Operator "equal" string
predicates null System.Collections.Generic.List<Syncfusion.EJ2.Base.WhereFilter>
value "FBA_" object {string}
value null object
The declaration of the grids is nearly identical, aside from the name and number of columns. All options are set the same. The data for the grids is also nearly identical, except for the obvious.
SKU in both grids is a string. The default for string columns is "startswith"; the default for numbers is "equal".
- Why would "equal" be used for filtering a string column when I haven't mentioned anywhere that I want to use "equal"?
- Why is this even throwing an error? I thought it might be the data that has null values it doesn't like. I have verified this is not the case.
Any light you could shed on this problem is appreciated.