jQuery UI Widgets Forums Grid Filtring

This topic contains 2 replies, has 2 voices, and was last updated by  shaser 12 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Filtring Posts
  • Filtring #13418

    shaser
    Member

    How I can filtering two or more column with the same filtering
    e.g.

    var searchText = $(“#searchField”).val();
    var filtergroup = new $.jqx.filter();
    var filter_or_operator = 1;
    var filtervalue = searchText;
    var filtercondition = ‘contains’;
    var filter = filtergroup.createfilter(‘stringfilter’, filtervalue, filtercondition);
    filtergroup.addfilter(filter_or_operator, filter);
    //filtergroup.addfilter(filter_or_operator, filter1);
    $(“#jqxgrid”).jqxGrid(‘addfilter’, “firstname”, filtergroup);
    // apply the filters.
    $(“#jqxgrid”).jqxGrid(‘applyfilters’);

    I have that code but I want apply that at two column at the same time I want search by first name and last name if I write the first name i want the result but if I write the last name I want the result too, I just got for one of those any Idea to that for both criteria?

    Thank you

    Filtring #13423

    Dimitar
    Participant

    Hello shaser,

    Please check out the forum topic Filtering Grid at Runtime Through TextBox where you can find an example of filtering applied on two columns.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Filtring #13449

    shaser
    Member

    Thank you Dimitar very simple 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.