View Full Version : populate a grid window using a json tree

30 Nov 2010, 3:37 AM
I have a window and in the window items i have a json tree....
Now according to what element the user selects in the tree it should open a animated window showing the window grid...now even the grid should populate values according to the element selected from the tree..
what changes do i have 2 do...plz help
This is my code
tree = new Ext.tree.TreePanel({

renderTo : mappingGLform,
height : 403,
width : 335,
useArrows : true,
dragConfig : false,
draggable : false,
autoScroll : true,
animate : true,
enableDD : false,
trackMouseOver : true,
containerScroll : true,
rootVisible : false,
frame : true,
hidden : true,
root : {
nodeType : 'async'
// auto create TreeLoader
dataUrl : 'json/gl.json',
listeners : {'checkchange' : function(node, checked) {
if (checked) {
// node.getUI().addClass('complete');
} else {


tree.filter = new Ext.ux.tree.TreeFilterX(tree);


mapping_UEST = new Ext.Window({
renderTo : document.body,
title : 'Mapping History',
layout : 'fit',
plain : true,
closable : false,
draggable : false,
x : '755px',
y : '53px',
height : 495,
width : '350px',
items : [tree]


30 Nov 2010, 5:29 AM
Not enough information.

When do you want to show the grid? When a user selects a node, or does he need to press a 'details' button after that or double-click the node or what...

Did you already create the window with the grid?

Where should the grid data come from and how is it related to the selected tree node?

30 Nov 2010, 5:38 AM
i want to display a grid window when the user selects a node...
like an on select fn so that a grid inside an animated window will open and display data according to the node selected...

30 Nov 2010, 5:57 AM
Write a 'click' event handler for the treepanel that opens the window with the grid and loads it according to the clicked node.

1 Dec 2010, 4:48 AM
is there any checked like the click event??...
as i want the event to be triggered when the user checks any node of the tree

1 Dec 2010, 6:32 AM
I don't understand the question...

1 Dec 2010, 9:54 AM
actually the click event works when i click on a specific node of the tree but i want a popup window to be displayed when the user selects a particular node(i am using a checkbox tree)...
my code for treePanel is based on the following eg...
Now if the user selects any node(lets say "take a nap") then a new popup window grid show populate showing values corresponding to the node selected (here "take a nap")...the values are stored in the database...