Hi there,
I have implemented server-side paging as per the attached project, which I found in another ejgrid thread. I got the paging working fine, but when I switched on the search toolbar item, the search toolbar passed through the filter and caused an exception when attempting to apply the filter.
The exception is: "An exception of type 'Microsoft.Data.OData.ODataException' occurred in Microsoft.Data.OData.dll but was not handled in user code. Additional information: No function signature for the function with name 'tolower' matches the specified arguments. The function signatures considered are: tolower(Edm.String Nullable=true)."
In the example, the EmployeeID field is an integer, and the Name field is a string.
When the odata filter is generated, it shows the following string: "(substringof('1',tolower(EmployeeID))) or (substringof('1',tolower(Name)))"
I believe the EmployeeID causes the exception because it is an Integer field, and there is no tolower or substring in an integer field.
I have tried specifying the type of the column and I have tried to set no filter on the column, but it ignores those attributes and passes the EmployeeId field anyway.
I have added a second grid to the sample application, where it uses all the same data, paging, attributes etc, but I have removed the EmployeeId field. This correctly applies the filter, because the only field is the name field, and it successfully applies the filter to the linq.
I have attached a VS2015 project to this thread.
Is there something that I am doing wrong?
Kind regards,
Tony
Attachment:
WebApplication7_afa17ae1.7z