GWT DataGrid自动高度 [英] GWT DataGrid automatic height

查看:134
本文介绍了GWT DataGrid自动高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的应用程序中插入一个gwt数据网格。如果我设置一个静态高度(500像素),一切都很好。但是我想使dataGrid自动调整为屏幕大小。高度100%我得到一个空白屏幕。
我也试图将datagrid放在一个resizeLayoutPanel中,结果相同。



任何提示?

解决方案

所有 RequiresResize 小部件应该给予一个明确的大小,或者添加到 ProvideResize widgets(最多一个 RootLayoutPanel 或一个 ProvideResize 小部件具有显式大小;唯一的例外是 ResizeLayoutPanel 它不实现 ProvideResize ,因为它不能履行其页眉和页脚小部件的合同,但它所以问题是:你在哪里添加你的 DataGrid 和/或 ResizeLayoutPanel


I'm trying to insert a gwt datagrid in my application. If i set a static height (500px) everything works nice. But i want to make the dataGrid auto adjust to screen size. With height 100% i get a blank screen. i've also tried to put the datagrid into a resizeLayoutPanel with the same results.

any tips?

解决方案

All RequiresResize widgets should be given an explicit size, or be added to ProvidesResize widgets (up to a RootLayoutPanel or a ProvidesResize widget with an explicit size; the only exception is ResizeLayoutPanel which doesn't implement ProvidesResize because it couldn't honor the contract for its header and footer widgets, but it definitely honors it for the center widget).

So the question is: where did you add your DataGrid and/or ResizeLayoutPanel?

这篇关于GWT DataGrid自动高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆