FIlter box with autocomplete
Thanks for using Syncfusion products.
We have achieved your requirement “AutoComplete suggestion operator must be specified exclusively and not from Filter Menu Dropdown” by using “focuIn” Autocomplete event. Please refer the following code example.
|
$("#Grid").ejGrid({ … //To bind the autocomplete “focusIn” event, as soon as Grid is rendered dataBound: function (args) { var proxy = this; setTimeout(function (e) { $("#" + proxy.element.attr("id") + "_acString").ejAutocomplete({focusIn:"customFocusIn"}); }, 100); } }); function customFocusIn(args) { this.model.filterType = "endsWith"; } </script> |
We have created a sample that can be downloadable from below link.
http://www.syncfusion.com/downloads/support/forum/121329/ze/EJGrid817178846
Regards,
Alan Sangeeth S

In our last update, we had suggested that you change the filterType for autocomplete suggestion to “endsWith”. In the focusin event of the ejAutocomplete, give the filterType as “StartsWith”, instead of “endsWith”, which will suggest the items independent of the operator selected from the dropdown. Please refer to the code example and screenshot.
|
$("#Grid").ejGrid({ allowFiltering: true, filterSettings: { filterType: "menu" }, allowScrolling: true, scrollSettings: { height: 300, allowVirtualScrolling: true, virtualScrollMode: ej.Grid.VirtualScrollMode.Normal }, dataSource: ej.DataManager({ url: "/Home/DataSource", adaptor: new ej.UrlAdaptor() }), columns: [ { field: "OrderID", isPrimaryKey: true, headerText: "Order ID" }, . . . . ], dataBound: function (args) { var proxy = this; setTimeout(function (e) { $("#" + proxy.element.attr("id") + "_acString").ejAutocomplete({ focusIn: function (args) { this.model.filterType = "StartsWith";//always suggest you startsWith word independent of the operator selected } }); }, 100); } |
We have prepared a sample with the above solution that can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/forum/121329/ze/FilterMenu_MVC327453155
If we had misunderstood your query, please send the replication procedure. It will be helpful to analyze the issue and provide a solution as early as possible.
Regards,
Seeni Sakthi Kumar S.
- 3 Replies
- 3 Participants
-
SE Stefano Enrico
- Dec 2, 2015 08:31 AM UTC
- Dec 10, 2015 05:53 AM UTC