1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    225
    Vote Rating
    0
    seldon is on a distinguished road

      0  

    Default LayoutDialog + Grid + toolbar display bug?

    LayoutDialog + Grid + toolbar display bug?


    Hi,

    I have a layoutdialog with center and east regions. In both regions I have a grid (center region contains grid with remote dataset, east region contains editgrid). The first problem is this. When i open the dialog, the grid toolbar falls out of the screen as shown in this screenshot:



    Moving the slider, somehow fixes the problem with the toolbar and puts the toolbar in the right place.

    After moving the slider, I close the dialog. When i re-open it again,this is what happens:



    Anyone knows how to fix this? (is it a bug? or my mistake?)

    Seldon


    [/img]

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    Is that a grid in a contentPanel or a gridPanel? This may be an issue of autoScroll vs fitToFrame - if you could post or link to a sample we could take a look.

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    225
    Vote Rating
    0
    seldon is on a distinguished road

      0  

    Default


    Ok, here is the code:

    Code:
    var LayoutExample = function(){
        // everything in this space is private and only accessible in the HelloWorld block
        
        // define some private variables
        var dialog, showBtn;
        
        // return a public interface
            
        return {
         
            init : function(){
                 showBtn = getEl('show-dialog-btn');
                 showBtn.on('click', this.showDialog, this, true);
            },
            
    		importContacts : function (selModel, row, ids){
    			
    		},
    
    		showContact :  function (selModel, row, ids){
    			if (ids.length > 0) {
    				dialog.getLayout().getRegion('east').getActivePanel().getGrid().getDataModel().load('index2.php', 'action=getContactInfo&contactpersoon_id=' + ids[0]);			 
    			}
    		},
                
    
    		saveGridChanges : function (grid, rowIndex, columnIndex){
    //			dialog.getLayout().getRegion('east').getActivePanel().getGrid().getDataModel().load('index2.php', 'action=updateContactInfo&contactpersoon_id=' + ids[0]);			 		 
    //		 	grid.getLastCell(grid.getRow(rowIndex)).innerHTML;
    		},
    		            
            showDialog : function(){
             
    			cm = new YAHOO.ext.grid.DefaultColumnModel([
    				{header: "veld", width: 100}, 
    				{header: "waarde", width: 100, editor: new YAHOO.ext.grid.TextEditor({allowBlank: false})} 
    			]);
    			cm.defaultSortable = true;
    			
    			dm = new YAHOO.ext.grid.XMLDataModel({
    			    tagName: 'Field',
    			    totalTag: 'TotalCount',
    			    id: 'id',
    			    fields: ['veld', 'waarde']
    			});
    			
    			dm.setDefaultSort(cm, 0, 'desc');
    			dm.baseParams = {'action': 'getContactInfo', 'contactpersoon_id' : 1};			
    
    			infogrid = new YAHOO.ext.grid.EditorGrid('info-grid', dm, cm);
    			infogrid.autoWidth = true;
        		infogrid.addListener('afterEdit', this.saveGridChanges);			
    			infogrid.render();	
             
    			sm = new YAHOO.ext.grid.SingleSelectionModel();
    			sm.addListener('selectionchange', this.showContact);
    			
    			cm = new YAHOO.ext.grid.DefaultColumnModel([
    				{header: "naam", width: 100}, 
    				{header: "email", width: 100}, 
    				{header: "adres", width: 130}, 
    				{header: "test", width: 120}
    			]);
    			cm.defaultSortable = true;
    			
    			dm = new YAHOO.ext.grid.XMLDataModel({
    			    tagName: 'contact',
    			    totalTag: 'TotalCount',
    			    id: 'id',
    			    fields: ['naam', 'email', 'adres', 'test']
    			});
    			
    			dm.initPaging('index2.php', 15);
    			dm.setDefaultSort(cm, 0, 'desc');
    			dm.baseParams = {'action': 'getContacts'};			
    
    			dm.addListener('load', sm.selectFirstRow, sm, true);
    			grid = new YAHOO.ext.grid.Grid('addressbook-grid', dm, cm, sm);
    			grid.autoWidth = true;
    			grid.render();						
    	
    			var toolbar = grid.getView().getPageToolbar();
    			toolbar.addSeparator();
    			toolbar.addButton({
    			    className: 'import-button',
    			    text: "",
    			    click: this.importContacts
    			});
    			dm.loadPage(1);        	    
    
    	    	if(!dialog){ // lazy initialize the dialog and only create it once
    	        dialog = new YAHOO.ext.LayoutDialog("hello-dlg", { 
    	                modal:true,
    	                width:800,
    	                height:600,
    	                shadow:true,
    	                minWidth:300,
    	                minHeight:300,
    	                east: {
    	                    split:true,
    	                    initialSize: 250,
    	                    minSize: 100,
    	                    maxSize: 350,
    	                    titlebar: true,
    	                    fitToFrame:true,
    	                    collapsible: true,
    	                    animate: true
    	                },
    	                center: {
    	                    titlebar: true,	                     
    	                    fitToFrame:true,	                    
    	                    autoScroll:true
    	                }
    	        });
    	        dialog.addKeyListener(27, dialog.hide, dialog);
    	        dialog.addButton('Close', dialog.hide, dialog);
    	        dialog.addButton('Submit', dialog.hide, dialog);
    			
    	        var layout = dialog.getLayout();
    	        dialog.beginUpdate();
    	        layout.add('east', new YAHOO.ext.GridPanel(infogrid, {title: 'Details'}));
    	        layout.add('center', new YAHOO.ext.GridPanel(grid, {title: 'Contacts'}));
    	        dialog.endUpdate();
    
    	        
    	    }
    	    dialog.show(showBtn.dom);
    		}
    	};
    }();
    
    // using onDocumentReady instead of window.onload initializes the application
    // when the DOM is ready, without waiting for images and other resources to load
    YAHOO.ext.EventManager.onDocumentReady(LayoutExample.init, LayoutExample, true);

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    I think this could be fitToFrame vs autoScroll confusion again.

    Jack should make a blog entry on this issue (If he has time...)

    fitToFrame is a config of ContentPanel and not meaningful on Region configs.

    And I thought autoScroll should be false on a Region if GridPanels were being added because they size themselves?

  5. #5
    Ext User
    Join Date
    Mar 2007
    Posts
    225
    Vote Rating
    0
    seldon is on a distinguished road

      0  

    Default


    I removed the fitToFrame from the region config, and added it to the gridPanel config. MOreover, i have set autoScroll to false in both regions, but still both problems remain ...

  6. #6
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    I think you're right. I do this with autoscroll:false on the region and fitToFrame:false on the GridPanel - not sure what the default values are. You should only get a scroll on the grid in this case if the rows exceed the height of the region.

  7. #7
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    What version are you running and do you have display:none set anywhere for the dialog element?

  8. #8
    Ext User
    Join Date
    Mar 2007
    Location
    Boston
    Posts
    349
    Vote Rating
    0
    sjivan is on a distinguished road

      0  

    Default


    I'm facing a similar problem : http://www.yui-ext.com/forum/viewtopic.php?t=1253

    In my case i'm displaying the grid in a tab. The grid div has style="border:1px solid #cccccc;overflow:auto;width:100%;height:100%;"

    I'm on .33 RC3.

    Seldon ,
    Are you seeing this behavior in Firefox too? Because I'm only experiencing the issue on IE 6.


    Sanjiv

  9. #9
    Ext User
    Join Date
    Mar 2007
    Posts
    225
    Vote Rating
    0
    seldon is on a distinguished road

      0  

    Default


    I'm running .33 RC3 and i do not have "display:none" set anywhere on the dialog. I do have "visibility:hidden" set on it though. My problem occurs in Firefox and and IE7 (I didn't test it in other browsers yet).

  10. #10
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    Can you could put up a link with a demo of the problem? It would make it a million times easier to find. Thanks.

Similar Threads

  1. toolbar menu on basic dialog or LayoutDialog
    By reang in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 21 Mar 2007, 11:27 PM
  2. LayoutDialog, toolbar and text/images
    By franklt69 in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 6 Mar 2007, 10:54 AM
  3. Replies: 1
    Last Post: 8 Jan 2007, 5:27 PM
  4. grid toolbar display issues in IE
    By sjivan in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 4 Dec 2006, 10:16 PM
  5. Cannot display 0 in grid
    By alcarx in forum Ext 1.x: Bugs
    Replies: 1
    Last Post: 16 Oct 2006, 2:54 AM

Thread Participants: 4

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