Results 1 to 3 of 3

Thread: headerClick all columns

  1. #1
    Sencha User
    Join Date
    Oct 2015
    Posts
    37
    Answers
    1

    Default Answered: headerClick all columns

    Hi,

    I'm trying to implement custom sorting behavior and for that, in Ext.grid.Panel headerclick event I must be able to change title of all column headers. I current have this:

    Code:
    headerclick: function (header, column, e, t, eOpts) {
    
                        column.setText(' ' + column.text + '(' + additionalInfo + ')');
                        
                        //columns.getColumnBeyKey('MoColumnName');
    
                }
    but I need to reach rest of column headers too as their name has to be updated. How can I accomplish this?



    Thanks,
    M

  2. Found it:


    Code:
           var grid = this.lookupReference('itemsGrid');
            var clmns = grid.getColumns();
    
                    clmns.forEach(function(fnColumn, scopeColumn, test) {
    
    
                            fnColumn.setText(fnColumn.text + '  yourinfo');
                        
                    });

  3. #2
    Sencha User
    Join Date
    Oct 2015
    Posts
    37
    Answers
    1

    Default

    Found it:


    Code:
           var grid = this.lookupReference('itemsGrid');
            var clmns = grid.getColumns();
    
                    clmns.forEach(function(fnColumn, scopeColumn, test) {
    
    
                            fnColumn.setText(fnColumn.text + '  yourinfo');
                        
                    });

  4. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Glad to hear you've found a solution, and thanks for sharing with the community.

Similar Threads

  1. Bufferedrenderer headerclick checkbox
    By adaminasabi in forum Ext: Q&A
    Replies: 1
    Last Post: 19 Aug 2013, 2:25 PM
  2. Multiple headerclick events when having sub-columns
    By LarssaAndin in forum Sencha Ext JS Q&A
    Replies: 2
    Last Post: 7 Aug 2012, 10:58 PM
  3. [FIXED] Column headerclick Event Not Working
    By kgmoney in forum Ext:Bugs
    Replies: 2
    Last Post: 15 Nov 2011, 6:01 AM
  4. Event headerclick
    By anderson.resendes in forum Ext: Discussion
    Replies: 1
    Last Post: 29 Jul 2011, 5:14 PM
  5. GridPanel - Add listener for headerclick
    By cntx in forum Ext: Discussion
    Replies: 3
    Last Post: 10 May 2011, 2:26 PM

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
  •