I am trying to change the default filter operator of a string type column with no sucsess using the Html helper syncfuison has provided.
i have the following:
@(Html.EJ().DataManager("FlatData").URL(Url.Action("NscDataSource", "Home", null, Request.Url.Scheme)).Adaptor(AdaptorType.UrlAdaptor))
@(Html.EJ().Grid<NscTicketInfo>("Grid")
.DataManagerID("FlatData")
.AllowPaging()
.AllowSorting()
.AllowMultiSorting()
.AllowFiltering()
.AllowSearching()
.ContextMenuSettings(contextMenu =>
{
contextMenu.EnableContextMenu();
})
.Columns(c =>
{
c.Field(f => f.ID).Width(60).Add();
c.Field(f => f.GlobalTicket.TicketDisplayID).Width(60).Add();
c.Field(f => f.Customer).Width(80).Add();
c.Field(f => f.Contact).Width(150).Add();
c.Field(f => f.Phone1).Width(120).Add();
c.Field(f => f.Fax).Width(120).Add();
c.Field(f => f.Email).Width(150).Add();
c.Field(f => f.Address).Width(150).Add();
c.Field(f => f.State).Width(60).Add();
c.Field(f => f.Zip).Width(60).Add();
c.Field(f => f.CategorizationLink).Width(50).Add();
c.Field(f => f.SourceLink).Width(40).Add();
c.Field(f => f.TraceID).Width(200).Add();
})
.FilterSettings(Sett => Sett.FilterBarMode(FilterBarMode.OnEnter)
.FilteredColumns(col => col.Field("Customer").Operator(FilterOperatorType.Equals).Add()))
.SortSettings(sort => sort.SortedColumns(col => col.Field("ID").Direction(SortOrder.Ascending).Add()))
.PageSettings(p => p.PageSize(30).EnableQueryString())
.ClientSideEvents(e => e
.Create("create")
.ActionComplete("onComplete")
.ActionBegin("actionBegin")
))
the highligheted lines are what i expect to change the defualt setting but i cannot figure out what i am missing. The grid will still post a dataManager with a where clause that has a startswith predicate.
Thank You
DIamond