datagrid body is disappeared!! height is zero!!

139 views
Skip to first unread message

tong123123

unread,
Jan 14, 2013, 9:55:02 PM1/14/13
to google-we...@googlegroups.com
in normal.jpg, the datagrid can shown correctly, the height is 180px and when render, the datagrid header height is 30px and the body is 150px.
but when the whole dockLayoutPanel is embedded in a TabLayoutPanel, the datagrid body become zero as shown in embedded.jpg!!
what is the cause?

and I check api, there is DataGrid.Style, but I cannot find how to use it, any example could be given? I think this is related to setting the style of DataGrid.
embedded.jpg
normal.jpg

tong123123

unread,
Jan 14, 2013, 10:50:46 PM1/14/13
to google-we...@googlegroups.com
I created the layout of the "central runtime Debug Log" tab in onLoad() method, I found that if I select the "central runtime Debug Log" tab programmatically in onModuleLoad() method, the datagrid can be shown with the scrollbar disappear as attached (scrollbar.jpg).

If in onModuleLoad() method, I do not select the "central runtime debug Log" tab programmatically or if I select it and then select other tab programmatically, then the datagrid cannot be shown.

so
1) is the strange problem related to I placed the build layout code in the DockLayoutPanel(the panel in the tab "central runtime debug log") onLoad method?
2) why the scrollbar will be disappeared?
3) why the datagrid body will be disappeared if I do not programmatically select the tab in onModuleLoad() method (I suspect am I wrong to place the UI creation code in onLoad() method?)
scrollbar.jpg

tong123123

unread,
Jan 15, 2013, 2:07:23 AM1/15/13
to google-we...@googlegroups.com
I see the following link
http://code.google.com/p/google-web-toolkit/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Milestone%20Summary%20Stars&groupby=&sort=&id=7065

and I follow the suggestion to add a SelectionHandler to the TabLayoutPanel, but the result is the datagrid scrollbar is not shown. I also add the comment to the above link.

I am using GWT 2.4

ashwin....@gmail.com

unread,
Jan 15, 2013, 2:30:31 AM1/15/13
to google-we...@googlegroups.com
do you place your grid directly on the layoutPanel or is it inside other panels like HTMLPanel etc?

I have had similar issues with loosing the size of the panel, In my case since I was using absolute positioning, I forced position of my grid on code to over come the issue.
myGrid.getElement().getStyle().setPosition(Position.ABSOLUTE);

Regards
Ashwin



--
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/-/OmjAuqnAJZkJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

tong123123

unread,
Jan 15, 2013, 2:55:42 AM1/15/13
to google-we...@googlegroups.com
DataGrid inside a FlexTable which is then inside a DockLayoutPanel.
it seem it is a bug of DataGrid inside a DockLayoutPanel as mentioned in
http://code.google.com/p/google-web-toolkit/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Milestone%20Summary%20Stars&groupby=&sort=&id=7065
but the provided workaround (add a selectionHandler in TabLayoutPanel and then redraw the DataGrid) is not worked properly, the scrollbar inside the DataGrid is not shown.

ashwin....@gmail.com

unread,
Jan 15, 2013, 3:06:19 AM1/15/13
to google-we...@googlegroups.com
datagrid inside a flex table would not invoke the resize of the grid. Add a resizelayoutPanel inside your dockLayout, override the resize method and set the height of the grid.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

Thomas Broyer

unread,
Jan 15, 2013, 3:24:02 AM1/15/13
to google-we...@googlegroups.com
Probably a silly question but why don't you just update to GWT 2.5? 

Juan Pablo Gardella

unread,
Jan 15, 2013, 3:53:43 AM1/15/13
to google-we...@googlegroups.com

Kei Kei

unread,
Jan 15, 2013, 9:56:01 PM1/15/13
to google-we...@googlegroups.com
finally I give up and change back to use celltable inside a scrollpanel.
client do not want to upgrade to GWT 2.5, so upgrade is not possible.
it happen in IE9 and FF13.

Reply all
Reply to author
Forward
0 new messages