For other plateform, i have found this method 'ejAutocomplete("destroy");
|
@{
ViewBag.Title = "Grid localization";
}
<div>
@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.dataSource).AllowFiltering().DataBound("bound").Columns(col =>
{
...
...
col.Field("ShipCountry").HeaderText("Ship Country").Width("150").EditType("dropdownedit").Add();
}).AllowPaging().FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Menu);}).PageSettings(page => page.PageSize(8)).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render()
</div>
<script>
function bound(args) {
var inputObj;
var elem;
this.columns[3].filter.ui = {
create: (args) => {
elem = document.createElement('input');
args.target.appendChild(elem);
inputObj = new ej.inputs.Input.createInput({
floatLabelType: 'Never',
element: elem
});
},
read: (args) => {
args.fltrObj.filterByColumn(args.column.field, args.operator, args.element.value);
},
write: (args) => {
elem.value = args.filteredValue || '';
}
}
}
</script> |
How would one achieve this same result in Angular? We also are struggling with suppressing the autocompletion. Same requirement as OP, just in Angular.
Phil,
By default, in our EJ2 Grid, in the filter menu we have rendered the AutoComplete component. Since you don’t want the AutoComplete behavior in the filter menu, we suggest you render the TextBox component in the filter to achieve your requirement.
We can render the custom component in the Filter Menu. The column.filter.ui is used to add custom filter components to a particular column. We have already discussed your requirement in our documentation, and we suggest you render the TextBox component to achieve your requirement. Please refer the below documentation for more information.
Documentation: https://ej2.syncfusion.com/angular/documentation/grid/filtering/filter-menu#custom-component-in-filter-menu
TextBox: https://ej2.syncfusion.com/documentation/textbox/getting-started