Hi There,
I have ejgrid with filter type = "filterbar".
I wounder how to clear the history that users have entered (in the red box below)?
Thanks in advance for help.
$(function () {
$("#Grid").ejGrid({
dataSource: Data,
allowPaging: true,
allowSorting: true,
allowFiltering: true,
filterSettings:{filterType:"filterbar", filterBarMode: ej.Grid.FilterBarMode.OnEnter},
columns: [
{ field: "OrderID", headerText: "Order ID", textAlign: ej.TextAlign.Right, width: 90 },
{ field: "OrderDate",type:"date", headerText: "Order Date", width: 200, format:"{0:dd-MMM-yyyy}"},
{ field: "CustomerID", headerText: "Customer ID", width: 100 },
{ field: "EmployeeID", type:"number",headerText: "Employee ID", textAlign: ej.TextAlign.Right, width: 100 },
],
//actionBegin:"actionBegin",
});
});
I have a solution for that. I hope it could help some one who is looking for similar solution.
$(function () {
$("#Grid").ejGrid({
dataSource: Data,
allowPaging: true,
allowSorting: true,
allowFiltering: true,
filterSettings:{filterType:"filterbar", filterBarMode: ej.Grid.FilterBarMode.OnEnter},
columns: [
],
create: "disableAutoComplete",
});
});
function disableAutoComplete(args) {
var i = 0, j = 0;
var len = this.model.columns.length,
columns = this.model.columns;
for (i = 0; i < len; i++) {
$("#" + columns[i].field + "_filterBarcell").attr("autocomplete", "off");
$("#" + columns[i].field + "_filterBarcell.e-ejinputtext.e-filtertext").attr("autocomplete", "off");
}
}