GWT: DataGrid - set height 100% not rendering properly

ⅰ亾dé卋堺 提交于 2019-12-29 08:01:29

问题


I am working with layout panels and datagrid. When I set the datagrid height to 100%, Grid is not rendering. My panel hierarchy looks like the following image

Am I doing it properly or I messed up the panel hierarchy???

Parent panel is the simple layout panel, inside that I have split layout panel -> scrollpanel -> datagrid


回答1:


DataGrid requires to be put in a LayoutPanel or Panel that implements the ProvidesResize interface to be visible. ScrollPanel implements that interface.

Furthermore this chain of LayoutPanels from your DataGrid up to your root element/panel has to be unbroken. That seems to be the case in your panel hierarchy.

Finally you have to use the RootLayoutPanel instead of the RootPanel to add your LayoutPanels.
So did you make sure that you add your SimpleLayoutPanel to the RootLayoutPanel ?




回答2:


In my case it was caused by this: DataGrid rows not visible in second tab of TabLayoutPanel



来源:https://stackoverflow.com/questions/11845196/gwt-datagrid-set-height-100-not-rendering-properly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!