We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Setting FilterMenu Search Type

Thread ID:

Created:

Updated:

Platform:

Replies:

130104 Apr 21,2017 12:02 PM Apr 24,2017 03:19 AM ASP.NET MVC 1
loading
Tags: Grid
Marc Call
Asked On April 21, 2017 12:02 PM

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! 

Jayaprakash Kamaraj [Syncfusion]
Replied On April 24, 2017 03:19 AM

Hi Marc, 

Thank you for contacting Syncfusion support. 

We have already discussed same in the following knowledgebase document. 


Regards, 

Jayaprakash K. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;