-
18 Dec 2008 4:15 AM #1
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.
when I change it in firebug to 100% it works ok, so I tried to change size in style :Code:for example gridPanel.setHeight("100%"); gridPanel.setWidth("100%"); it makes something like this element.style { height:576px; overflow-x:hidden; width:783px; }
and now it doesn't work, because it wants just integer values!Code:gridPanel.setStyleAttribute("width", "100%");
can someone explane how to make it work correctly? thanks
ps I use latest GXT framework
-
18 Dec 2008 4:36 AM #2
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.GXT JavaDocs: http://extjs.com/deploy/gxtdocs/
GXT FAQ & Wiki: http://extjs.com/learn/Learn_About_the_Ext_GWT_Library
Buy the Book on GXT: http://www.apress.com/book/view/9781430219408
Follow me on Twitter: http://twitter.com/gslender
-
18 Dec 2008 4:44 AM #3
-
18 Dec 2008 4:47 AM #4
you can still use ContentPanel - just replace what I said regarding LayoutContainer with ContentPanel = same outcome
GXT JavaDocs: http://extjs.com/deploy/gxtdocs/
GXT FAQ & Wiki: http://extjs.com/learn/Learn_About_the_Ext_GWT_Library
Buy the Book on GXT: http://www.apress.com/book/view/9781430219408
Follow me on Twitter: http://twitter.com/gslender
-
18 Dec 2008 5:17 AM #5
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 )
-
18 Dec 2008 5:23 AM #6
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%
-
18 Dec 2008 6:43 AM #7
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?
-
18 Dec 2008 12:22 PM #8
GXT JavaDocs: http://extjs.com/deploy/gxtdocs/
GXT FAQ & Wiki: http://extjs.com/learn/Learn_About_the_Ext_GWT_Library
Buy the Book on GXT: http://www.apress.com/book/view/9781430219408
Follow me on Twitter: http://twitter.com/gslender
-
18 Dec 2008 12:24 PM #9
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.GXT JavaDocs: http://extjs.com/deploy/gxtdocs/
GXT FAQ & Wiki: http://extjs.com/learn/Learn_About_the_Ext_GWT_Library
Buy the Book on GXT: http://www.apress.com/book/view/9781430219408
Follow me on Twitter: http://twitter.com/gslender
-
18 Dec 2008 12:25 PM #10
GXT JavaDocs: http://extjs.com/deploy/gxtdocs/
GXT FAQ & Wiki: http://extjs.com/learn/Learn_About_the_Ext_GWT_Library
Buy the Book on GXT: http://www.apress.com/book/view/9781430219408
Follow me on Twitter: http://twitter.com/gslender


Reply With Quote