pkt1583 / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 0 forks source link

Change the autoHeight and autoScroll properties of GridPanel after being rendered #357

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  final EditorGridPanel grid = new EditorGridPanel(); 
2.  grid.setAutoScroll(true);
3.  grid.setAutoHeight(true);
4.  Panel containerGridPanel = new Panel();
    containerGridPanel.setId("containerGridPanel");
5.  containerGridPanel.setHeight(800);
6.  containerGridPanel.add(grid);  
7.  grid.addListener(new PanelListenerAdapter(){
         public void onBodyResize(Panel panel, String w, String h)
     {
           Panel parentPanel = (Panel) Ext.getCmp("containerGridPanel");
           if(panel.getHeight() > parentPanel.getInnerHeight())
           {
              panel.setAutoHeight(false);
              panel.setHeight(parentPanel.getInnerHeight());
              panel.syncSize();
           }
         }
This currently gives an error "Cannot change configuration property
'autoHeight' after the component has been rendered."

What is the expected output? What do you see instead?
The 'autoHeight' and 'autoScroll' properties should be allowed to change
after the grid has been rendered as in Ext JS. As a result, we can resize
grids dynamically depending on the underlying data.

What version of the product are you using? On what operating system?
gwtext-2.0.3

Please provide any additional information below.

Original issue reported on code.google.com by valla...@gmail.com on 25 Jun 2008 at 9:26