jQWidgets Forums

jQuery UI Widgets Forums TreeGrid Highlighting filtered rows after applying filter through API

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

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

  • anomit
    Participant

    I managed to get a numeric range filter working on a data field. The problem is, in the tree view, the filtered results also include the parent nodes which is confusing when someone selects a filter value of, say, 2 <= Avg Score < 3, the data field in the parent can have a value that’s not in the range yet is displayed. Is there any event I can hook in to apply some rules or any other approach so that I get to see a highlighted effect on the rows that match the filter?

    This is the filter I applied through API and following it is a screenshot that shows the state of the TreeGrid after
    `filtergroup = new $.jqx.filter()
    filtervalue = 3
    filtercondition = ‘LESS_THAN’
    filter1 = filtergroup.createfilter(‘numericfilter’, filtervalue, filtercondition)
    filter_or_operator = 0
    filtergroup.addfilter filter_or_operator, filter1
    filtervalue = 2
    filtercondition = ‘GREATER_THAN_OR_EQUAL’
    filter2 = filtergroup.createfilter(‘numericfilter’, filtervalue, filtercondition)
    filtergroup.addfilter filter_or_operator, filter2
    $(“#treeGrid”).jqxTreeGrid ‘removefilter’, ‘avg_score’
    $(“#treeGrid”).jqxTreeGrid ‘addfilter’, ‘avg_score’,filtergroup
    $(“#treeGrid”).jqxTreeGrid ‘applyfilters’`

    filtered treegrid


    Peter Stoev
    Keymaster

    Hi anomit,

    Unfortunately, this is not possible in our TreeGrid control.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    anomit
    Participant

    Isn’t there a way to hide the parent nodes at least?


    Peter Stoev
    Keymaster

    Hi anomit,

    Nope. I will create a work item and we will consider such options for the future TreeGrid versions

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    rao
    Participant

    Hi JqWidget Team,
    I am using jqxTreeGrid.
    I have a requirement of filters combination.
    Here is my case : At the top of the table there will be search implementation.
    Once i make the search it gives me matching records(on datafieldX) in the TreeGrid.
    And i have 2 toggle buttons (datafield1, datafield2) to filter data further.
    Here i have a requirement of showing the records from search Result, either if datafiled1 matches or datafield2 matches.

    Assume datafiled1 is Designation (my criteria is ‘Manager’) and datafiled2 is Dept (my criteria is “Sales”)

    Finally : 1) i will make text based “search”, say location as “London” (assume i got 50 resulted rows out of 100.) — result 50 rows
    2) I will click on ‘Show managers’ button (there are 5 out of 2 working in SALES dept) — result is 5 rows
    3) I will click on ‘show Sales People’ button (there are 20 sales ppl out of 50 from the results of #1) — result is : 23

    NOTE : There are 20 sales ppl, out of that there are 2 managers; And rest 3 are ‘Managers’ working in different departments, London based.

    i have implemented something like below

    var filterGroup = new $.jqx.filter();
    var filter_or_operator = 1; //OR condition
    var filterValue = true;
    var filterCondition = ‘equal’;

    var filter = filterGroup.createfilter(‘booleanfilter’, filterValue, filterCondition);
    filterGroup.addfilter(filter_or_operator, filter);

    the same filterGroup i used for adding both filters (managers, sales)

    althogh my filter_or_operatior is assigned to 1, i am not seeing the expected count of 23, but ONLY 2, which is INTERSECT of condition.

    Can i get some help here please ?

    Regards,
    Rao.

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

You must be logged in to reply to this topic.