Results 1 to 5 of 5

Thread: How to hide gridpanel columns ?

  1. #1
    Sencha User
    Join Date
    Mar 2008
    Posts
    79
    Vote Rating
    1
      0  

    Default Answered: How to hide gridpanel columns ?

    I tried with to hide columns as below:

    Code:
    Ext.ComponentQuery.query('#email')[0].show();
    or
    Code:
    gridPanel.columns[14].show();
    but hiding one column its working fine but in case of multiple columns more than 3 its hanged and sometimes have to kill the page ...

    any suggestion and help would be appreciated.

    Thanks & Regards
    vik

  2. If you're hiding multiple columns at once you should suspend layouts:

    Code:
    Ext.suspendLayouts();
    
    // Hide columns
    
    Ext.resumeLayouts(true);
    I'm not sure this will help if it's hanging but it should improve performance.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716
    Vote Rating
    505
      0  

    Default

    It would help to see your code. The call should not break unless you are trying to access a bad column.

    You can also use reconfigure if you have a lot of columns:
    https://fiddle.sencha.com/#fiddle/2r1

  4. #3
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585
    Vote Rating
    394
      0  

    Default

    If you're hiding multiple columns at once you should suspend layouts:

    Code:
    Ext.suspendLayouts();
    
    // Hide columns
    
    Ext.resumeLayouts(true);
    I'm not sure this will help if it's hanging but it should improve performance.

  5. #4
    Sencha User
    Join Date
    Mar 2008
    Posts
    79
    Vote Rating
    1
      0  

    Default

    Hello skirtle,

    thanks for reply but your below approach did't work for me.

    Code:
    Ext.suspendLayouts();  // Hide columns  Ext.resumeLayouts(true);

  6. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716
    Vote Rating
    505
      0  

    Default

    As mentioned, you would need to show your code.

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
  •