[CLOSED] Change heigth of gridpanel programatically in javascript

  1. #1

    [CLOSED] Change heigth of gridpanel programatically in javascript

    How to? I'm trying "grid.heigth = 500;" but the size is not changed.
    Last edited by Daniil; Aug 13, 2011 at 2:27 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use the .setHeight() method.
    GridPanel1.setHeight(500);
  3. #3
    Kind of worked, but the grid is into a gridpanel... i have to set it's height bigger and at the same time the other items in the borderlayout smaller...
    Can you provide an example?
  4. #4
    Please, see this example to make it clearer:

    http://web.mxm.com.br/exemplolayout/

    I want to have a button, and when it's clicked the height of the grids "Encargos" and "Fundo de Promoção" will get smaller, and of the grid "Aluguel" will get bigger, so that the user can see more rows of the grid "Aluguel". When it's clicked again everything goes back to the default.
  5. #5
    Change a height for the grid "Aluguel" and call 'doLayout' for its container
    grid.setHeight(150);
    grid.ownerCt.doLayout();
  6. #6
    Thanks, that did it.

Similar Threads

  1. Replies: 3
    Last Post: Oct 05, 2012, 11:44 AM
  2. Replies: 0
    Last Post: Jul 03, 2012, 10:38 AM
  3. Replies: 2
    Last Post: Oct 06, 2011, 8:40 AM
  4. Replies: 0
    Last Post: May 30, 2010, 10:24 PM
  5. Replies: 1
    Last Post: Jan 29, 2009, 9:35 AM

Posting Permissions