I have a window similar to Outlook (Folders), where I define folders like Leads, Opportunities, etc...

This part looks like this:

PHP Code:
{
                        
title'Folders',
                        
iconCls'folder',
                        
borderfalse,
                        
items: [{
                            
xtype'FoldersTree',
                            
listeners: {
                                
click: function(nodee) {
                                    
console.log(node);
                                    
console.log(e);
                                    
mainPanel.removeAll();    
                                    
mainPanel.add({
                                        
xtype'LeadGrid',
                                        
region'center',
                                        
anchor'100%'    
                                    
});
                                    
mainPanel.doLayout();
                                },
                                
scopethis                    
                            
}
                        }]
                    } 
next by I have a mainPanel defined as:

PHP Code:
var mainPanel = new Ext.Panel({
            
region'center',
            
title'Main Panel',
            
borderfalse,
            
layout'border',
            
margins'5px 5px 5px 0px',
            
items: [{
                
title'Inbox',
                
iconCls'inbox',
                
region'center',
                
html'Inbox content'
            
},{
                
region'south',
                
height300,
                
splittrue,
                
html'Mail content'
            
}]
        }); 
When I click on treenode I'd like to display on the right side a grid of records, instead of mail data, but get following error:

PHP Code:
dom is undefined
[Break on this errorMATH.max(dom.offse..., hidden dom.clientWidth) || 0

I also would like to awoid any card layout, as there is many different types of records, which would slow down display time.
What could be the reason?