#4900 closed defect (fixed)
Grid does not resize with parent widgets
Reported by: | Bryan Forbes | Owned by: | sorvell |
---|---|---|---|
Priority: | high | Milestone: | 1.1 |
Component: | DojoX Grid | Version: | 0.9 |
Keywords: | Cc: | alex, dylan | |
Blocked By: | Blocking: |
Description
When the grid is parented by a widget that inherits from dijit.layout._LayoutContainer, it does not resize when the parent widget resizes. Rather, you are required to use this code to get it to resize:
dojo.connect(container, "resize", grid, function() { grid.resize(); });
This makes using the grid as a standard widget inside container widgets a pain.
Attachments (2)
Change History (16)
comment:1 Changed 13 years ago by
Owner: | changed from sorvell to alex |
---|---|
Status: | new → assigned |
comment:2 Changed 13 years ago by
Cc: | alex dylan added |
---|---|
Resolution: | → invalid |
Status: | assigned → closed |
comment:3 Changed 13 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Reopening and adding a test. This test is exactly like test_grid_layout.html except the bottom container is a dijit.layout.LayoutContainer?. If you move the split up, you'll notice that the bottom grid does not resize.
Changed 13 years ago by
Attachment: | test_grid_layout_2.html added |
---|
comment:4 Changed 13 years ago by
Bryan, this looks wrong:
<div id="bottomRight" dojoType="dijit.layout.LayoutContainer" sizeMin="20" sizeShare="30"> <div id="grid3" dojoType="dojox.Grid" model="model" structure="layout2"></div> </div>
You can probably just get rid of the LayoutContainer? and make the Grid a child of the LayoutContainer?'s parent.
comment:5 follow-up: 6 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Marking invalid; feel free to reopen with a valid testcase, as per my advice above.
comment:6 Changed 13 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Replying to bill:
Marking invalid; feel free to reopen with a valid testcase, as per my advice above.
Here is a test case (test_grid_layout_3.html) that shows invalid sizing of grid when we try to set it as layoutAlign="client". Grid seems to ignore arguments passed from _LayoutWidget and takes the height from parent node (it should take parent.h-topNode.h-bottom.h).
Changed 13 years ago by
Attachment: | test_grid_layout_3.html added |
---|
Test case for invalid sizing of grid
comment:7 follow-up: 9 Changed 13 years ago by
Milestone: | 1.0 → 1.0.1 |
---|---|
Owner: | changed from alex to sorvell |
Status: | reopened → new |
Ah, I see the problem. resize() should accept an optional argument specfying the size. From _LayoutWidget.js:
resize: function(args){ // summary: // Explicitly set this widget's size (in pixels), // and then call layout() to resize contents (and maybe adjust child widgets) // // args: Object? // {w: int, h: int, l: int, t: int}
But grid doesn't support that.
comment:8 Changed 13 years ago by
Milestone: | 1.0.1 → 1.0.2 |
---|
comment:9 Changed 13 years ago by
Are there any plans how it would be done? It would be nice if grid will fit whole available client area. Maybe there is a chance to add support for columns that will expand their width if there is more horizontal space available?
comment:10 Changed 13 years ago by
Milestone: | 1.0.2 → 1.0.3 |
---|
comment:11 Changed 13 years ago by
Milestone: | 1.0.3 → 1.1 |
---|
comment:12 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:13 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:14 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
[12876] Grid should now size correctly (at least in simple layouts) inside a LayoutContainer? and a BorderContainer?
this bug appears to be somewhat inaccurate. See http://dojotoolkit.org/~alex/anon_view/dojox/grid/tests/test_grid_layout.html
If not parented by a ContentPane? (a known resize() event black-hole), resize events are correctly cascaded.
Marking "invalid".