1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    13
    Vote Rating
    0
    someuser is on a distinguished road

      0  

    Default Grid width/height

    Grid width/height


    Hello everyone!

    I have a problem with a grid, when I set width or height to 100% it resizes grid to current conteiner size, but I need make it dynamical.
    Code:
    for example
      gridPanel.setHeight("100%");
      gridPanel.setWidth("100%");
    
    it makes something like this
    element.style {
    height:576px;
    overflow-x:hidden;
    width:783px;
    }
    when I change it in firebug to 100% it works ok, so I tried to change size in style :
    Code:
    gridPanel.setStyleAttribute("width", "100%");
    and now it doesn't work, because it wants just integer values!

    can someone explane how to make it work correctly? thanks

    ps I use latest GXT framework

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    1st - this post should be really in the help forums - please read the forum rules regarding posting bugs before you post -> http://extjs.com/forum/showthread.php?t=40289

    2nd - the problem is simply solved by putting the grid into a LayoutContainer that has the layout set to FitLayout and then the grid will size itself to fit the container. You don't size the grid at all in that case. Of course layout container would need to be sized with the window, and that can be done by a ViewPort.

  3. #3
    Ext User
    Join Date
    Jun 2008
    Posts
    13
    Vote Rating
    0
    someuser is on a distinguished road

      0  

    Default


    Quote Originally Posted by gslender View Post
    1st - this post should be really in the help forums - please read the forum rules regarding posting bugs before you post -> http://extjs.com/forum/showthread.php?t=40289

    2nd - the problem is simply solved by putting the grid into a LayoutContainer that has the layout set to FitLayout and then the grid will size itself to fit the container. You don't size the grid at all in that case. Of course layout container would need to be sized with the window, and that can be done by a ViewPort.
    1. sorry move please my post there
    2. i migrate from gwt ext to gxt, so i put it to content panel like in gwt ext so i thought that it is a bug.

  4. #4
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    you can still use ContentPanel - just replace what I said regarding LayoutContainer with ContentPanel = same outcome

  5. #5
    Ext User
    Join Date
    Jun 2008
    Posts
    13
    Vote Rating
    0
    someuser is on a distinguished road

      0  

    Default


    no, when I use ContentPanel it works like I said in first post.
    with LayoutContaner seems it works, but i have another problem and now i am trying to solve it )

  6. #6
    Ext User
    Join Date
    Jun 2008
    Posts
    13
    Vote Rating
    0
    someuser is on a distinguished road

      0  

    Default


    for more information i use this structure:
    -MyPanel extends LayoutContainer(FilLayout)
    -ContaintPanel that has all another panels
    -Grid in ContainerPanel

    all them have FitLayout, and for all I setted width and height 100%

  7. #7
    Ext User
    Join Date
    Jun 2008
    Posts
    13
    Vote Rating
    0
    someuser is on a distinguished road

      0  

    Default


    One more question about Grid in GXT. There was ObjectFieldDef for RecordDef in Gwt Ext to set custom object to cell, in GXT there is just GridCellRenderer that returns Html string.

    Is there any way to put my widget to grid's cell?

  8. #8
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    Quote Originally Posted by someuser View Post
    no, when I use ContentPanel it works like I said in first post.
    with LayoutContaner seems it works, but i have another problem and now i am trying to solve it )
    it shouldn't - contentpanel extends layoutcontainer and has the same layout functionality.

  9. #9
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    Quote Originally Posted by someuser View Post
    One more question about Grid in GXT. There was ObjectFieldDef for RecordDef in Gwt Ext to set custom object to cell, in GXT there is just GridCellRenderer that returns Html string.

    Is there any way to put my widget to grid's cell?
    GWT-Ext has nothing to do with GXT - this was a completely different project based on wrapping GWT around the ExtJS Javascript library - and so the api is way different to GXT, which is a GWT library using similar widget styles/html etc

    Grid doesn't support widgets - but you can use Table which does.

  10. #10
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    Quote Originally Posted by someuser View Post
    for more information i use this structure:
    -MyPanel extends LayoutContainer(FilLayout)
    -ContaintPanel that has all another panels
    -Grid in ContainerPanel

    all them have FitLayout, and for all I setted width and height 100%
    Please post some sample code as you are probably laying out things incorrectly.

Thread Participants: 3

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar