on return to ToDataSourceResult giving error when trying to search id when grouping is applied

0 Answers 131 Views
Filter Grid
Akshay
Top achievements
Rank 1
Akshay asked on 09 Nov 2022, 01:02 PM

Hi Scenario is like when I have made a grouping in my kendo grid and after that if try to search the Id(int) of the grid it throws an error also my grid is server side . getting the error when I am trying to return the list from the controller also it works fine for other columns that are of type string . only the error is coming if we try to search after grouping .

return isGrouping ? Json(lstofToolAction.ToDataSourceResult(request), JsonRequestBehavior.AllowGet) : Json(new { Data = lstofToolAction, Total = total }, JsonRequestBehavior.AllowGet);
          



Error :

Provided expression should have string type\r\nParameter name: stringExpression filter.
Yanislav
Telerik team
commented on 14 Nov 2022, 09:41 AM

Hello Akshay,

I've reviewed the code snippet you've shared, but unfortunately, I was not able to spot a possible reason for the error. However, I've noticed if the 'isGrouping' equals false, you are returning just an object with Data and Total fields which in some cases is enough for the Grid, but we usually encourage our users to return a DataSourceResullt object, so may I ask you is there a reason to do it this way? 

However, since the provided details are not enough for me to be sure why the error is thrown, may I ask you to share more details about the configurations and how we can reproduce the issue?

No answers yet. Maybe you can help?

Tags
Filter Grid
Asked by
Akshay
Top achievements
Rank 1
Share this question
or