Results 1 to 3 of 3

Thread: enableColumnHide not working with Ext.apply

  1. #1
    Sencha User SurenderBhyan1's Avatar
    Join Date
    Nov 2013
    Location
    INDIA
    Posts
    130
    Answers
    7

    Default Answered: enableColumnHide not working with Ext.apply

    Hi,

    Platform: ExtJS 4.2.1, 6.2.0
    Browser: Chrome

    Requirement:
    In some case, I need to hide the Column menu from column header context menu dynamically after the grid has been rendered.

    I am trying to apply enableColumnHide config using Ext.apply to the grid to hide the column menu, but its not working.

    Code:
    {
      xtype: 'button',
      text: 'Disbale',
      handler: function() {
       Ext.apply(grid, {
          enableColumnHide: false
       });
     }

    Below is the fiddle:



    https://fiddle.sencha.com/#fiddle/1gkg

    Please confirm if there is an alternate to achieve the same.
    ---A ship in the harbor is safe, but that is not what the ships are made for...

  2. Thanks hakimio for clarifying,

    But I achieved the same with adding and removing css at run time.

    Code:
    Ext.util.CSS.removeStyleSheet('hideHDMenu');
    Ext.util.CSS.createStyleSheet('.x-column-header-trigger{ display: none !important;}', 'hideHDMenu');




    Below is the working fiddle:


  3. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    900
    Answers
    105

    Default

    You can't change that config on runtime. It's not a bug.

  4. #3
    Sencha User SurenderBhyan1's Avatar
    Join Date
    Nov 2013
    Location
    INDIA
    Posts
    130
    Answers
    7

    Default

    Thanks hakimio for clarifying,

    But I achieved the same with adding and removing css at run time.

    Code:
    Ext.util.CSS.removeStyleSheet('hideHDMenu');
    Ext.util.CSS.createStyleSheet('.x-column-header-trigger{ display: none !important;}', 'hideHDMenu');




    Below is the working fiddle:

    ---A ship in the harbor is safe, but that is not what the ships are made for...

Similar Threads

  1. Replies: 1
    Last Post: 10 Jul 2014, 7:16 AM
  2. Grid enableColumnHide plus locking
    By charlie17 in forum Ext: Q&A
    Replies: 2
    Last Post: 29 Jan 2013, 6:57 PM
  3. Overriding EnableColumnHide in Ext JS 3.3.1
    By hailey in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 7 Jun 2011, 11:08 AM
  4. Question about auto tooltip and enableColumnHide in GridPanel
    By just_a_kid in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 12 Oct 2010, 9:39 AM

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
  •