Hybrid View

  1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    40
    Vote Rating
    0
    jeromer is on a distinguished road

      0  

    Default Answered: Problems Trying To Edit Tree Panel ExtJS 4

    Answered: Problems Trying To Edit Tree Panel ExtJS 4


    I'm using the attached code to edit a treepanel. If I use configuration of clicksToEdit:2, it works fine on the leaf nodes but not on a branch node. If I use configuration of clicksToEdit:1, it works on both nodes. Of course I want 2 clicks. Anyone had this problem?

    Code:
    var store = Ext.create('Ext.data.TreeStore',{
            //autoLoad:true,
            model:'CP.model.ProductGroupsModel' /*,
            root:{    text: "Complaint Product Groups",
                    expanded:true,
                    leaf:false 
            }*/
        }
    );
    
    
    Ext.override(Ext.data.AbstractStore,{
        indexOf: Ext.emptyFn
    }); 
    
    
    
    
    Ext.define('CP.view.productGroup.PGView' ,
        {
            extend: 'Ext.tree.Panel',
            alias : 'widget.pgTree',
            title : 'All Complaint Product Groups',    
            autoScroll:  true,
            useArrows:true,
            viewConfig:{plugins:{ptype:'treeviewdragdrop'}},
            store:store,
            rootVisible:false,
            fbar: 
            [
    
    
                  {xtype:'button',text:'Save' },
                 {xtype:'component',flex:1}             
            ],
            selType: 'cellmodel',
            plugins: [
                Ext.create('Ext.grid.plugin.CellEditing', {clicksToEdit:2})
            ],
            columns:[{xtype:'treecolumn',text:'Product Group / Parts',dataIndex:'text',flex:1,sortable:true,editor:{xtype:'textfield',allowBlank:false}},{text:'Description',dataIndex:'description',flex:2,sortable:false}]
            
        }        
    );

  2. Try adding toggleOnDblClick: false to your viewConfig.

  3. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    Try adding toggleOnDblClick: false to your viewConfig.

  4. #3
    Sencha User
    Join Date
    May 2011
    Posts
    40
    Vote Rating
    0
    jeromer is on a distinguished road

      0  

    Default


    This WORKED!!!....thanks..BUT, where/how did you find the toggleOnDblClick config opt for the viewConfig. I sure would like to know how to find some of this good stuff.

  5. #4
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      1  

    Default


    I just looked at the source code. Had a search through the relevant source files for 'dblclick' and struck lucky. I was expecting to have to override a method but someone was forward-thinking enough to provide a setting.

  6. #5
    Sencha User
    Join Date
    May 2011
    Location
    Argentina
    Posts
    54
    Answers
    2
    Vote Rating
    0
    ferengidedalo is on a distinguished road

      0  

    Default


    how do you edit the NODE itself... not another column?

    thanks!

  7. #6
    Sencha User manojmoktan's Avatar
    Join Date
    Feb 2014
    Location
    Kathmandu, Nepal
    Posts
    6
    Vote Rating
    0
    manojmoktan is on a distinguished road

      0  

    Default


    Hi jeromar,would you plz post any link that you have successly editing tree panel. i couldn't solve of edit on tree panel node and their leaf.Thanks in Adavance

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar