We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Columns filters not showing all available options: search not working

Thread ID:

Created:

Updated:

Platform:

Replies:

141605 Dec 20,2018 09:12 AM UTC Dec 21,2018 10:35 AM UTC ASP.NET MVC - EJ 2 2
loading
Tags: Grid
Charles Southey
Asked On December 20, 2018 09:12 AM UTC

Hi,

We have a fairly urgent problem to resolve with the Grid control. The columns filters only show  a subset of the available options in each column to filter on (5 + all)  - and there does not seem to be any way to control this. If we could boost this up to 10 it would meet our need. The Search facility on the filter columns also does not seem to be working for any of the filter styles - we can trace the requests back to the datasource and see that it is returning the correct results to the grid, but the filter box in the grid seems to ignore that an always just shows "No Results Found" no matter what the search term is.
 


Charles Southey
Replied On December 20, 2018 11:25 PM UTC

I have partially got to the bottom of this: it appears that the grid samples the first 1,000 records to get values for the filters: we have put our own filters to restrict the data set so it does not go over that. However we still have the problem with the search not working - and it would be helpful to get more information server-side on data retrievals triggered by opening a filter list so we can control how the filter list gets its data  (and make it much more efficient).  Simply grabbing all the data every time is a very inefficient way of doing this -we can write server-side code that intelligently supplies the right values.


Madhu Sudhanan P [Syncfusion]
Replied On December 21, 2018 10:35 AM UTC

Hi Charles, 

Greetings from Syncfusion. 

Query #1: Simply grabbing all the data every time is a very inefficient way of doing this -we can write server-side code that intelligently supplies the right values. 
 
We have validated your query and we suggest to use the addParams method of the query property to achieve your requirement. In the below sample, using actionBegin event when requestType is filterbeforeopen we have passed a variable and in the controller based on this value you can change datasource provided to create the filter items in excel filter. Please refer to below sample and documentation for your reference, 

Code Example:  

[.cshtml] 
... 
function begin(args) { 
        if (args.requestType == 'filterbeforeopen') { 
            cloneQuery = this.query; 
            this.query = new ej.data.Query().addParams("excelfilter", true); 
        } 
    }... 
[.cs] 
... 
if (dm.excelfilter
            { 
                DataSource = operation.PerformTake(DataSource, 2);    //we have just passed the first two records to the excel filter items 
                //You can change the filter data according to your requirement here 
            } 
... 



Query #2: The Search facility on the filter columns also does not seem to be working for any of the filter styles - we can trace the requests back to the datasource and see that it is returning the correct results to the grid, but the filter box in the grid seems to ignore that an always just shows "No Results Found" no matter what the search term is. 

Before we start working on this query, please provide the below mentioned information or details. It will help us provide better solution as soon as possible, 

  1. not seem to be working for any of the filter styles” here what do you mean by ‘filter styles’, please explain in detail on this?
  2. By default ‘number’ and ‘date’ fields are set with ‘equal’ operator while searching from excel filter, so please provide more details about the fields?
  3. Please share your full grid server and client side code example?
 
Regards, 
Madhu Sudhanan P 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;