Frage

I am using this plugin in my asp.net mvc application.

Jquerygrid search function working as expecting. But I want only search with "contains or not". How can I do that?

My search picture is shown below: enter image description here

War es hilfreich?

Lösung

You need to use the SearchOptions list on the JQGridColumn to specify which filter criteria you want to use for a given column.

If you leave the SearchOptions empty then it will display all the search rules, so you need to write something like this:

private void SetUpSearchDialogGrid(JQGrid grid)
{   
    var column = grid.Columns.Find(c => c.DataField == "Id");
    //...

    column.SearchOptions.Add(SearchOperation.Contains);
    column.SearchOptions.Add(SearchOperation.DoesNotContain);                

    //..
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top