I have a grid that I'm using the FilterBar FilterType. The problem is that for string columns it forces a search of "Starts with" which is very useless for us. Is there a way to manually override this and use "Contains" or other search criteria?
My control code:
@(Html.EJ().Grid<Resource>("resourceGrid")
.Datasource((IEnumerable<object>)ViewBag.datasource)
.AllowSorting()
.AllowPaging()
.AllowFiltering()
.FilterSettings(filter => { filter.FilterType(FilterType.FilterBar);
})
.AllowResizing()
.AllowResizeToFit()
.AllowSelection(false)
.EnableRowHover()
.ClientSideEvents(eve => { eve.RecordClick("gotoResource"); })
.Columns(col =>
{
col.Field("Id").HeaderText("Id").TextAlign(TextAlign.Left).Width(40).Add();
col.Field("ResourceTypeName").HeaderText("Resource Type").TextAlign(TextAlign.Left).Width(80).Add();
col.Field("ProductName").HeaderText("Product").TextAlign(TextAlign.Left).Width(75).Add();
col.Field("Name").HeaderText("Name").TextAlign(TextAlign.Left).Width(75).Add();
col.Field("Description").HeaderText("Description").TextAlign(TextAlign.Left).Width(80).Add();
col.Field("Url").HeaderText("Url").TextAlign(TextAlign.Left).Width(80).Add();
}))
Previously we were using the Menu Filter which allows you to choose the search filter from a menu, but this was painful as it would always default to an option that we never want to use.
Help please!