I am using dhtmlxConnector for PHP v.1.5 Everything works fine. But next line
gives a php error:
Fatal error: Call to undefined method GridConnector::filter() in my_connector.php on line 10
I got instructions here docs.dhtmlx.com/doku.php?id=dhtm … ods#filter
Please grab the latest version of connector from github
A curiosity ! In this old post why did you suggest to use the connector version in github instead of downloading your last version 1.5.
1.5 version is not the last version ?
Anyway i tried to use github version and the filter method seems to run with grid_connector but not with TreeGridConnector.
I’ve a TreeGrid like this:
Field1 Field2 Field3
In this structure i’ve the 3rd level with the Field3 that could be set to 1 (boolean) and i need to filter my treegrid to show only the rows with value 1, of course toghether with there Level1 and Level 2 parents as happens in client-side filtering. The problem is that i can’t use clien-side filter because i’m using dynamic_loading.
I tried this code:
$tree = new TreeGridConnector($res);
If i use it with grid_connector the filter runs, of course, showing only the lower level without its upper parents.
If i use treegridconnector, no rows are shown.
Can you help me ?
Version at dhtmlx.com is stable, but not the latest one.
Version at github is the latest one with all fixes and new features but may be not so well tested
In most cases, the latest code from github is a better choise.
Hi Stan and thanks for your answer but while you are answering i was modifing my post.
Can you read it again please !
Unfortunately, there is no way to achieve the desired result with TreeConnector currently.
In case of dynamic loading TreeConnector will fetch data only for one level of tree at once, so while providing first level of data connector just has not info about value of Field 3 on third level of hierarchy.
OK but isn’t there a way to let treeconnector understand the level ? The information about the parents is included in kidsxmlFile ! and in the render_table sintax are included ID and PARENT ID.
Assumed it only that the field to filter i specified in php script is in first level ?
Anyway in the php script where i set the tree->filter i don’t use dynamic loading while it’s set in the script file used for kidsxmlFile.
Isn’there some way to solve the problem ? i know you are a genius !
Using client-side filtering without dynamic loading is too slow !
There are separate TreeMultitableConnector that allows to define a separate configuration for each level of the table, so you can configure a separate filter instruction for desired level of tree.
docs.dhtmlx.com/connector__php__ … ector.html