trinzia
January 14, 2011, 5:15pm
#1
Hi,
For each leaf of tree, I want to update Grid display. This part is using a separate tree and grid, not the treeGrid. When clicking an item in tree, the page should show the Grid items associated with that leaf.
How should I begin this?
Should I load all possible values of Grid for all leafs, and then use javascript to show/hide the rows? Would I use setRowHidden ? Is there a setRowVisible function in API?
Or should I try “Defining Row Level Parser”:
docs.dhtmlx.com/doku.php?id=dhtm … ta_loading
Can you point me to where I should look? Thanks!
Olga
January 14, 2011, 5:37pm
#2
You can catch “onSelect” event of the Tree and re-load Grid with new data:
tree.attachEvent("onSelect", function(id){
grid.clearAll();
grid.load(url);
});
trinzia
January 14, 2011, 6:13pm
#3
Additional question:
Does the tree support OnKeyPressed or any events to capture keys pressed?
Thanks!
trinzia
January 14, 2011, 6:30pm
#4
Once I placed the tree and the grid both into the doOnLoad event, so they are inside the same Javascript, your solution worked.
Your code worked both times, using load and loadXML.
tree.attachEvent("onSelect", function(id){
mygrid.clearAll();
//mygrid.load("connect/get_mygrid.php");
mygrid.loadXML("connect/get_mygrid2.php");
})
Which one should I be using, if I used Connector to load from MySQL?
Thanks!
trinzia
January 18, 2011, 10:04am
#7
I looked there first.
So, it is not possible to allow keyboard shortcut like Ctrl-V?
Thanks.
Olga
January 18, 2011, 3:06pm
#8
try to use onKeyPress event
Olga
January 18, 2011, 3:07pm
#9
This event is fired only if keyboard navigation is used:
tree.enableKeyboardNavigation(true)