Results 1 to 3 of 3

Thread: make the node of the treelist as disabled after it is rendered by ajax proxy

  1. #1

    Default make the node of the treelist as disabled after it is rendered by ajax proxy

    Hi,

    I have a treelist which i am loading using an ajax proxy store. After loading, i need to decide which of my nodes has to be set using a specific css class(to show it as disabled or enabled node) . How can i achieve this using a viewConfig. I am using Ext JS 7 Classic. Someone please suggest me how to do this. Thanks in advance

    NOTE: Please note i am using a treelist and not a treepanel (Ext JS Classic)

    I have something like this.
    Code:
    {
                    xtype: 'treelist',
                    bind: {
                        store: '{navItems}' // This is a proxy store filled up with an ajax request
                    },
                    defaults: {
                        xtype: 'treelistitem',
                    },
                    viewConfig: { 
                        getRowClass: function (record, rowIndex, rowParams, store) {
                            console.log('record-----', record); // This does not get called at all
                            return 'row-disabled-modified';
                        }
                    },
                    listeners: {
                        'contextmenu': {
                            element: 'element',
                            fn: someFn',
                            preventDefault: true,
                        }
                    }
                }
    
    Please suggest me how can i do this.

  2. #2
    Sencha Premium User
    Join Date
    Mar 2017
    Posts
    32

    Default

    Hi!
    There is no viewConfig on TreeList.
    You could use rowClsProperty : The name of the associated record's field to map to the rowCls config.

  3. #3

    Default

    Hi thanks.. and sorry for the very late reply.

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
  •