jQuery UI Widgets Forums General Discussions How to clear filterItems in jqxGrid

This topic contains 4 replies, has 3 voices, and was last updated by  admin 4 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • How to clear filterItems in jqxGrid #112327

    trigonoah
    Participant

    Hi,

    I’m having an issue trying to clear out the filteritems in a filterrow checkedlist dropdown. I’m dynamically changing the filteritems to match the grid’s data whenever the grid is changed/updated/filtered. There’s one case where nothing is displayed in the grid, so I want to clear out all selections from the filterrow dropdown accordingly. I’ve tried the following to no avail:

    $('#jqxgrid').jqxGrid('setcolumnproperty', 'SomeColumnDataField', 'filteritems',[]);
    $('#jqxgrid').jqxGrid('setcolumnproperty', 'SomeColumnDataField', 'filteritems',new Array());
    $('#jqxgrid').jqxGrid('setcolumnproperty', 'TSomeColumnDataFieldat', 'filteritems',null);

    but none of these options seem to change the checkedlist dropdown in for the column’s filterrow. How can I go about emptying the filterItems for a column?

    How to clear filterItems in jqxGrid #112333

    admin
    Keymaster

    Hi trigonoah,

    Have you tried with the “clearfilters” method?

    $('#jqxGrid').jqxGrid('clearfilters');

    Best regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/

    How to clear filterItems in jqxGrid #112413

    trigonoah
    Participant

    Hi,

    Trying the code you mention only removes filters that are applied to the jqxGrid. What I want to accomplish is to make the dropdown checkbox list of filter items be empty. Such that when the user clicks on the filter row dropdown, it only displays “Select All” with no other choices. Currently whenever I try to clear out the filter row items for a given column it defaults to populating the dropdown list.

    How to clear filterItems in jqxGrid #113146

    TylerFryer
    Blocked

    I tried setting up filters on my site page. The problem is that you need to apply five types of filters by default, and I only want three types. As a result, I can’t remove unnecessary filters.

    How to clear filterItems in jqxGrid #113147

    admin
    Keymaster

    Hi TylerFryer,

    Why do you need to apply five types of filters? You can apply any number of filters.

    Best regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/

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

You must be logged in to reply to this topic.