Results 1 to 2 of 2

Thread: Hiding Columns in Grid

  1. #1
    Ext User
    Join Date
    Jul 2007
    Location
    nyc
    Posts
    12

    Question Hiding Columns in Grid

    My application has two modes, an edit mode and a view mode. Toggling between these modes should cause different columns in a grid to show and hide. Is there an easy way to do this without screwing around with the columnModel. I've tried that and I end up getting some funky results.

    Is there something like myGrid.columns[0].visible = false, or something along those lines?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    your column model controls the columns. Just gotta find column by ID and execute .setHidden(true);

    Class Ext.grid.ColumnModel


    setHidden
    public function setHidden( Number colIndex, Boolean hidden )
    Sets if a column is hidden.
    Parameters:

    * colIndex : Number
    The column index
    * hidden : Boolean
    True if the column is hidden

    Returns:

    * void

    This method is defined by ColumnModel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •