1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    India
    Posts
    180
    Answers
    1
    Vote Rating
    -6
    AtulDawkhare can only hope to improve

      0  

    Default Unanswered: Grid with Display none is not working

    Unanswered: Grid with Display none is not working


    Hi there,
    I have Grid which is working very fine. Currently I have rendered to one Div tag.
    Now the scenario is something like this.
    I have 2 Grids to be display on One page, when one Grid is on second should be disabled / Hidden.

    My Html code is
    Code:
    <div id="grid1" style="height: 98%; padding: 2px; display: none;"></div>
    <div id="grid2" style="height: 98%; padding: 2px; display: none;"></div>
    And in ExtJs I have created one Toolbar having two buttons, show / hide

    Code:
    	Ext.create('Ext.toolbar.Toolbar', {
    	    renderTo: 'toolbar',
    	    width   : 500,
    	    items: [
    	        { xtype: 'button', text: 'Show',handler : function() {
                	   
    	        	alert(grid.isVisible(true)); 
                	  grid.show();
                	   
                   	}
                   },
                   { xtype: 'button', text: 'Hide',
                	   handler : function() {
                    	   
                		   grid.hide();
                       	}}
    	       
    	    ]
    	});
    Now in the above scenario, when I have put display none, no grid is getting displayed.
    And when I checked with isVisible() method is it giving me true, i.e. Gird is visible.

    Hope I am able to explain very well here.
    Please guide me, If the Div has attribute display none, how Can I display my grid ?
    Also what is the best thing to achieved this?

    Please correct me , if I am going wrong somewhere.

  2. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,669
    Answers
    130
    Vote Rating
    110
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    the gridpanel itself has the config:
    Code:
    hidden : Boolean
    True to hide the component.
    
    Defaults to: false
    which should override what you configure in your html.

    a more general question: why don't you use a tabpanel?
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi