Dojo (x) Widgets in HTML table do not change
I have the following page using Dojo 1.3.1 javascript toolkit
Content Pane
HTML table two columns, N rows
Column 1 (left): text
Column 2 (right) Dojo widget (can be any, but mostly Grids, pullodwn, etc)
Problem:
When the page loads, it displays Ok (the widget type and number on the page are determined at runtime, so I can't manage this with static CSS)
When I add rows to the grid while it is embedded in a table cell
<td> grid </td>
the given row (where the grid is embedded) gets proportionately higher and everything under the grid disappears and there are no scrollbars in the content pane to navigate to the rows below.
I don't know how to solve it, I have set 100% or auto height and width to everything around the page. It does not help.
I'm wondering if my design approach is wrong and unresolved. I've read about people saying not to use Tables for layout, but I don't know at design time the order and type of controls that I will be displayed. How else can you do this?
I think the problem is that when the grid is inside a table cell and the grid expands, the cell expands, but the holding content area does not know this so that the borders are not redrawn.
Dijit widgets work like regular nodes as much as possible. But many widgets, especially those that allow the user to define what the size is (as you can with the width of the columns in the grid) need to know the specific dimensions.
The good news is that with most of these widgets, you can get an instance of the widget and call widget.resize();
source to share