Results 1 to 7 of 7

Thread: populate a grid window using a json tree

  1. #1

    Default populate a grid window using a json tree

    Hi...
    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,
    enableTabScroll: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 {
    node.getUI().removeClass('complete');
    }
    }
    }

    });

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


    tree.getRootNode().expand(true);

    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]
    });

    thanks

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    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?

  3. #3

    Default

    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...

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Write a 'click' event handler for the treepanel that opens the window with the grid and loads it according to the clicked node.

  5. #5

    Default

    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

  6. #6
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    I don't understand the question...

  7. #7

    Default

    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...
    http://dev.sencha.com/deploy/dev/exa...heck-tree.html
    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...

    thanks..

Similar Threads

  1. search form to populate grid with json
    By digy79 in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 14 Sep 2009, 6:23 AM
  2. DD tree > dataview = grid populate
    By fruitwerks in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 1 Sep 2009, 2:33 PM
  3. Populate form with JSON data in desktop window
    By Rogge in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 11 Feb 2009, 2:58 AM
  4. Populate grid via Json
    By sanjshah in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 3 May 2008, 8:27 AM
  5. Using a grid's datastore to populate tree-node
    By momo in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 8 Jun 2007, 12:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •