Results 1 to 5 of 5

Thread: How to detect hidden columns by CSS

  1. #1
    Sencha User
    Join Date
    Sep 2013
    Posts
    4

    Default How to detect hidden columns by CSS

    I wonder how ExtJS makes columns hidden without any visible CSS changes!

    magic1.jpg

    The problem that I had - I can't set the CSS rule to hide children icon in that hidden column. F.e. if the hidden td had class 'hidden', I can use something like that:

    Code:
    td.hidden img {display:none;}
    But in this case I can do it only in renderer with manipulating grid.columns[col].isHidden().

    Code:
    renderer: function(value,td,record,row,col,store,view) {
        return grid.columns[col].isHidden() ? '' : someFunctionToRenderColumn();
    },
    It's ok, but then if I show hidden column it will not refresh grid and shows empty column. Of course I can add one more event for show/hide that column, but it is so difficult! Has it any simple way?

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    574

    Default

    Why do you need to set display:none? You absolutely positioning icon? Then try instead background-image and background-position for column-inner div.

  3. #3
    Sencha User
    Join Date
    Sep 2013
    Posts
    4

    Default

    Quote Originally Posted by ettavolt View Post
    Why do you need to set display:none? You absolutely positioning icon? Then try instead background-image and background-position for column-inner div.
    Thanks for answer! But it is not just image, it's a button (<img onclick=",,," ...)

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    574

    Default

    Why don't you use 'cellclick' on grid/view or 'click' on column events?

  5. #5
    Sencha User
    Join Date
    Sep 2013
    Posts
    4

    Default

    Quote Originally Posted by ettavolt View Post
    Why don't you use 'cellclick' on grid/view or 'click' on column events?
    Cause cellclick binded for another function, the image is just a button to show additional prices of that year.

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
  •