Hybrid View

  1. #1
    Sencha User
    Join Date
    Nov 2010
    Location
    France
    Posts
    37
    Vote Rating
    2
    EBS is on a distinguished road

      0  

    Default Hide column doesn't work

    Hide column doesn't work


    Bonjour,

    How to hide columns dynamically ?

    this code doesn't work
    Code:
    var cols = grid.columns;
    cols.each(function(column){
         column.hide();
    }
    ==> Error : column.hide is not a function
    In API doc, the function hide() exists for column.


    this code has no error but the columns are still visible
    Code:
    var cols = grid.columns;
    cols.each(function(column){
              column.hidden = true;
    }

    EBS

  2. #2
    Sencha User
    Join Date
    Mar 2010
    Posts
    41
    Vote Rating
    0
    karnak is on a distinguished road

      0  

    Default


    EBS,

    Can you try:

    Code:
    var cols = grid.columns;
    cols.each(function(column){
              column.setVisible(false);
    }

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Location
    France
    Posts
    37
    Vote Rating
    2
    EBS is on a distinguished road

      0  

    Default


    Error : column.setVisible is not a function

  4. #4
    Sencha User
    Join Date
    Mar 2010
    Posts
    41
    Vote Rating
    0
    karnak is on a distinguished road

      0  

    Default


    EBS,

    Just noticed the issue:

    You need to use forEach, not each. See below:

    Code:
    var cols = grid.columns;
    cols.forEach(function(column){
              column.hide();
    }

  5. #5
    Sencha User
    Join Date
    Nov 2010
    Location
    France
    Posts
    37
    Vote Rating
    2
    EBS is on a distinguished road

      0  

    Default


    each works too (Ext.Array.each);
    but not the function hide()

  6. #6
    Sencha User
    Join Date
    Mar 2010
    Posts
    41
    Vote Rating
    0
    karnak is on a distinguished road

      0  

    Default


    very strange... All works fine for me with the code I posted and all of my grid columns disappear.

Similar Threads

  1. Replies: 5
    Last Post: 7 Jun 2012, 12:46 AM
  2. Replies: 1
    Last Post: 7 Apr 2011, 3:00 PM
  3. Replies: 1
    Last Post: 12 Nov 2010, 3:00 AM
  4. Problem with tab. Hide/unhide a tab doesn't work on IE
    By marxan in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 7 Sep 2010, 7:38 AM
  5. Replies: 3
    Last Post: 16 May 2009, 5:48 AM

Thread Participants: 4

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