- Home
- Forum
- ASP.NET MVC
- Filtering on Grid Error
Filtering on Grid Error
Hi there,
I have an issue when filtering on specific columns only.
When I try to filter on the Address or Town column I get an Error 500.
I have attached my controller code, along with my html code as well.
Can you let me know why this is not working?
Thanks,
Frankie
Frankie
Attachment: Source_b75821f3.zip
SIGN IN To post a reply.
3 Replies
AS
Alan Sangeeth S
Syncfusion Team
October 18, 2017 05:54 AM UTC
Hi Frankie,
We are unable to reproduce the issue in our end. Generally, 500 error occurs for any server-side exceptions. So, could you please send us the exception details with stack-trace so that we could you provide you solution as early possible?
Regards,
Alan Sangeeth S
Alan Sangeeth S
FM
Frankie Moran
October 18, 2017 07:46 AM UTC
Hi,
I have put a breakpoint on the ActionResult and it looks like it is using the 'Where' in the DataManager, however, instead of using the Operator in the Where Filter, it is using the Predicates.
This means when it comes to filtering out the data it is unable to do it because the 'Where' clause uses the .Operator command?
Can you help?
Thanks,
Frankie
MS
Mani Sankar Durai
Syncfusion Team
October 19, 2017 12:28 PM UTC
Hi Frankie,
We have checked the query and we are not able to reproduce the reported issue. Based on your requirement we have pass the filtering value and operator based on the predicates and it filters correctly.
Refer the code example
|
@(Html.EJ().Grid<object>("Grid")
.Datasource(ds => ds.URL("/OrderTables/DataSource").Adaptor(AdaptorType.UrlAdaptor))
.AllowPaging(true)
.AllowFiltering()
.FilterSettings(filter=> filter.FilterType(FilterType.Excel))
.Query("new ej.Query().where(ej.Predicate('OrderID',ej.FilterOperators.equal, 10399, true).or('CustomerID', ej.FilterOperators.startsWith, 'V', true)).take(5)")
.Columns(col =>
{
...
}))
|
We have also prepared a sample that can be downloaded from the below link,
Refer the screenshot below.
Refer the screenshot of the grid data that filters correctly.
If you still face the issue please get back to us with the following details.
1. Share the video of the issue that you have faced.
2. Share the Syncfusion Essential studio version details that you have used.
3. If possible please reproduce the issue in the above attached sample
The provided information will help us to analyze the issue and provide you the response as early as possible.
Please let us know if you need further assistance.
Regards,
Manisankar Durai.
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
FM Frankie Moran
- Oct 17, 2017 10:47 AM UTC
- Oct 19, 2017 12:28 PM UTC