The 100% won't help you, because the FlowPanel (which contains your 
DataGrid as I understand it) has a height of 0 unless you fill it with 
widgets that mount their own height.

In other words, you are creating a cycle: The FlowPanel asks its children 
for the height they need, and the child (DataGrid) conversely asks the 
parent FlowPanel for its height. Obviously, this doesn't work, and in CSS, 
it always ends up with a height of 0 (not a special GWT thing).

It's not, that DataGrid and CellTable aren't interchangeable. To the 
contrary: They are highly interchangeable, but they differ basically in 
exactly this point: CellTables span up their own height from "inside out", 
whereas DataGrids require the size from "outside in".

(Note: Almost the only real reason for the requiresResize() is, that 
DataGrid uses a HeaderPanel, which performs one of the few JavaScript 
tricks still needed today, because CSS still can't do HeaderPanel-like 
layouts by itself.)


On Monday, December 3, 2012 5:39:55 PM UTC+1, Tony B wrote:
>
> Well, that makes sense, I guess.  Granted, I don't know what size to 
> expect, thus the percentage :-).  I cannot just assume a PC browser, but 
> also need to plan for mobile devices.
>
>
> There is a really good example out there ( 
> here<http://rvsoni.wordpress.com/2011/10/25/gwt-datagrid-with-pagination-using-simple-pager/>).
>   Maybe I should just rework my code to mimic this example more closely.  
> Maybe that will help me wrap my head around things.
>
> It looks like my assumption was right: CellTable and DataGrid are not, 
> strictly speaking, interchangeable ( not without extra work ).  To bad.
>
> Thanks.
>
> Tony
>
>
>
> On Monday, December 3, 2012 2:59:49 AM UTC-5, Thomas Broyer wrote:
>>
>>
>>
>> On Monday, December 3, 2012 12:05:49 AM UTC+1, Tony B wrote:
>>>
>>> Ooops, missed your second question, about the parent widget.  Here is 
>>> the path:
>>> FlowPanel -> WidgetList -> DataGrid
>>>
>>> Your comments above about the contraints are what made me ask my 
>>> question in the first place.  I even set the size of the DataGrid to 100% 
>>> on the hunch that that would meet your rule that it must be "explicitly 
>>> sized".
>>
>>
>> 100% isn't reliable. RequiresRzsize widgets have to be informed when 
>> their size change, so you have to give them a size that won't change on 
>> your behalf (I think EMs and EXs will be detected –i.e. when the user 
>> changes his browser font settings–, though probably not by each and every 
>> RequiresResize widget; better stick with pixels).
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/expzpkx8S0oJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to