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.
Unfortunately, activation email could not send to your email. Please try again.

Turn of autocomplete in Filter Menu

Thread ID:

Created:

Updated:

Platform:

Replies:

132388 Aug 29,2017 08:51 PM Aug 31,2017 01:11 AM ASP.NET Core 3
loading
Tags: Grid
James Wilkinson
Asked On August 29, 2017 08:51 PM

I have a Grid with a data source that has millions of records.  I use the UrlAdaptor with paging to avoid querying the whole table.  I added a Menu Filter to the columns of the grid.  Now when I start typing in the text box the system runs a query with RequiresCounts = false, Skip=0 and Take=0 when . This results in a full table query which takes up to 30 seconds.  My guess is this is to populate the suggestions dropdown.

Is there a way to stop this query from running at the View.  If not then I guess I can trap this situation in the controller and just return no records.

Regards
Jim

Saravanan Arunachalam [Syncfusion]
Replied On August 30, 2017 04:37 AM

Hi James, 
Thanks for contacting Syncfusion’s support. 
We have analyzed your requirement, we understood from your query, you need to place the ejDropDownList instead of ejAutoComplete in the menu filter dialog and we have already discussed this query in the following knowledge base document. 
Or, if you want to render the ejAutoComplete with empty record, we suggest you to set the empty array to its dataSource which doesn’t make the post back for autocomplete’s search and it does show the empty suggestion list. Please refer to the below code example. 
function create(args){ //Create event of Grid control 
            this.element.on("mousedown", ".e-gridheader .e-filtericon", function () { 
                    $("#Grid_stringDlg").ejDialog({ 
                    //open event of the filter menu dialog 
                    open: function (e) { 
                        var dp = this.element.find(".e-autocomplete"), instance; 
                        if (dp.length) { 
                            instance = dp.data("ejAutocomplete"); 
                            instance.option("model.dataSource", []); 
                        } 
                    } 
                }); 
            }) 
        } 
 
 
Regards, 
Saravanan A. 


James Wilkinson
Replied On August 30, 2017 10:10 AM

Thanks.

I opted for setting the dataSource to null.  But I had to add the following inside the "if" statement to remove the annoying "No suggestions" results box.

instance.option("model.showEmptyResultText", false);

Jim


Saravanan Arunachalam [Syncfusion]
Replied On August 31, 2017 01:11 AM

Hi James, 
Thanks for your update. 
Yes, you can set the “showEmptyResultText” as false to hide the suggestion box and we are also happy that the provided information helped you. 
Regards, 
Saravanan A. 


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.

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.

;