Results 1 to 2 of 2

Thread: Multi Selection of nodes on a tree Panel to populate a grid

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    149
    Answers
    2

    Default Answered: Multi Selection of nodes on a tree Panel to populate a grid

    Hello
    I have been working on a application using spring mvc-extjs4.
    I have a tree panel and a grid populating based on the tree panel.Now I want to implement a multisection on the tree panel,i.e if we select multiple tree nodes,subsequent records should be visible in the grid.

    Ex:
    If I have Manchester United as a tree node and the grid displays its players.If I select a second team say Rel Madrid it should display,players of both teams.
    Two possibilities I thought about:
    1) Using a ctrl button(Normal multiselect option on keypress)
    2) Using checkbox.(Adding checkbox to tree panel(not sure if doable,maybe a treegrid needed) and on checking each box of subsequent node values to be displayed in the grid.)

    I would like to know what is possible to implement and easy way to go about it.

    My tree and grid panel current function to select a node and populate grid is as follows.

    Code:
     treePan.getSelectionModel().on('select', function(selectionModel,record,index,options) {        
        var getid = record.getId('id');      
        console.log(getid);
                 store_company.load({
                       params: {
                            // start:0,
                             getid:getid    
                            // limit:itemsPerPage
                            }        
                     });
                
                 });
    Any suggestions/inputs appreciated.
    Thanks for the time.

  2. What you should do is:
    1. Config your tree with multiSelect set to true.
    2. Listen for 'selectionchange' event on your tree and proceed from there.

  3. #2
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    347

    Default

    What you should do is:
    1. Config your tree with multiSelect set to true.
    2. Listen for 'selectionchange' event on your tree and proceed from there.

Tags for this Thread

Posting Permissions

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