1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    60
    Vote Rating
    0
    gxtyas is on a distinguished road

      0  

    Default GXT Grid - How can i hide the grid column from the Header Menu columns drop down

    GXT Grid - How can i hide the grid column from the Header Menu columns drop down


    How can i hide the grid column from the Header columns menu item?

    colconfig.setHidden(true) hides col from the grid but it is visible when user views the Header - columns menu item,

    is it possible to hide the column from the grid & as well the column menu?

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,691
    Vote Rating
    107
    sven is just really nice sven is just really nice sven is just really nice sven is just really nice

      0  

    Default


    You need to remove the column from the ColumnModel/create a new one without this column and than reconfigure your grid.

  3. #3
    Sencha User
    Join Date
    Sep 2010
    Posts
    60
    Vote Rating
    0
    gxtyas is on a distinguished road

      0  

    Default


    If i remove the column from the columnModel, then i will never be able to access that column field via grid.getFields();

    I have a compare functionality, on compare, I read all the grid fields and for each field name/id, I fetch the value from store map properties.

  4. #4
    Sencha User chalu's Avatar
    Join Date
    Feb 2008
    Location
    Benin City, Nigeria
    Posts
    479
    Vote Rating
    0
    chalu is on a distinguished road

      0  

    Default


    In ExtJs this can be achieved with something like this :
    Code:
      column.setHidden(true)      // hide the column from the grid
      column.setHideable(false)   // this ensures the the user cannot toggle hide/show on the column with the header menus
    I think we need this feature in GXT, its very important

  5. #5
    Ext GWT Premium Member
    Join Date
    Apr 2011
    Posts
    66
    Vote Rating
    0
    subendu is on a distinguished road

      0  

    Default Solution:

    Solution:


    Can be achieved simply by setting the columnHeader of the columnconfig object in question, to either null or empty string "".

Similar Threads

  1. [2.0b1] grid header menu on non-sortable columns
    By slobo in forum Ext 2.x: Bugs
    Replies: 6
    Last Post: 14 Jul 2011, 1:24 AM
  2. Replies: 5
    Last Post: 24 Jul 2010, 10:06 AM
  3. Columns in the column hide menu are not aligned
    By han_999 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Dec 2008, 1:39 AM
  4. Can you change grid column header menu for individual columns?
    By NegrilLover in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 26 Jun 2008, 5:38 PM
  5. How to hide menu on datagrid column header?
    By ectalk in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 6 Oct 2007, 8:46 PM