jQuery UI Widgets › Forums › TreeGrid › Custom numericfilter on a column that defines a range
Tagged: treegrid widget
This topic contains 3 replies, has 2 voices, and was last updated by Peter Stoev 11 years, 6 months ago.
-
Author
-
I am working on a personal project to understand how TreeGrid would fit into a reporting and administrative function. I have a hierarchy of people in an organization and all of them have a certain “rank score” associated with them. I programmatically have been able to implement a filter of the following kind:
Rank Score > 1
Rank Score < 4but when I tried to implement a range filter (1 <= Rank Score <= 2) with the following code, I was unsuccessful. From what I understand the filter_or_operator = 0 should make the multiple filters be chained with an ‘AND’ operator but it seems that is not the case.
var filtergroup = new $.jqx.filter(); var filtervalue = 1; var filtercondition = 'GREATER_THAN_OR_EQUAL'; var filter1 = filtergroup.createfilter('numericfilter', filtervalue, filtercondition); var filtervalue2 = 2; var filtercondition2 = 'LESSER_THAN_OR_EQUAL'; var filter2 = filtergroup.createfilter('numericfilter', filtervalue2, filtercondition2); var filter_or_operator = 0; filtergroup.addfilter(filter_or_operator, filter1); filtergroup.addfilter(filter_or_operator, filter2); $("#treeGrid").jqxTreeGrid('addfilter', 'rank_score', filtergroup); $("#treeGrid").jqxTreeGrid('applyfilters');On a related note, I saw this demo in the Grid section. Is it possible to get a similar filter on a single column in TreeGrid? If yes, then I wouldn’t need to programmatically extend like the above scenario.

Thanks!
Hi anomit,
Unfortunately, jqxTreeGrid does not Column Filters so it would not be possible to display filters in Column Popups.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comOk, so how about the range filter that I might be able to implement with the API? 1 <= Rank Score <= 2
Hi anomit,
Filter conditions could be “GREATER_THAN” and “LESS_THAN” for creating filters through API.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.