GWT-Ext EditorGridPanel渲染问题
我正在使用 GWT 1.6.4 和 GWT-Ext 2.0.6。 我正在尝试使用 EditorGridPanel 并面临渲染问题。
当模块加载时,我使用 BorderLayout 创建一个面板(TopPanel)并将其添加到 ViewPort。 然后,我创建另一个面板 (CenterPanel) 并将 EditorGridPanel、三个按钮添加到 BorderLayout 面板 (TopPanel) 的中心。 我尝试了很多 CenterPanel 布局,但仍然无法得到我想要的。
我希望表格显示所需的数据和滚动条。 所有三个按钮都位于表格下方。 模块加载时,表的数据通过异步调用获取,因此当屏幕呈现给用户时,数据将填充到表中。 但看起来表格渲染时没有数据,当异步过程完成时,表格被填充,但没有调整大小以适合屏幕,因此只显示一行。
问题出在网格上,我没有得到任何滚动条。 其次,我不想定义网格的高度和宽度。 我希望它尽可能多地显示滚动条,就像我们在 html 表格中将宽度和高度设置为 100% 一样。
谢谢
I am using GWT 1.6.4 and GWT-Ext 2.0.6. I am trying to use EditorGridPanel and facing rendering problems.
When the module loads I create a Panel (TopPanel) with BorderLayout and add that to the ViewPort. I then create another Panel (CenterPanel) and add EditorGridPanel, three buttons to the center of the BorderLayout Panel (TopPanel). I tried many layouts for CenterPanel but still not able to get what I want.
I want the table to showup with the required data and scrollbars. All the three buttons comes below the table. The data for the table come via Async call when the module loads, so when the screen is rendered to the user, the data is populated in the table. But looks like the table gets rendered with no data and when the async process finishes the table gets populated but don’t get resized to fit the screen so only show me one row.
The problem is with the Grid, I am not getting any scrollbars. Secondly I don’t want to define the height and width of the Grid. I want it to take as much as possible and show scrollbars, just like we do in html table by setting width and height as 100%.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经找到了解决方案。 我必须在面板上添加网格。 我必须将该面板的布局设置为 FitLayout()。 其次,在向 Store 加载数据后,必须在该面板上调用 doLayout() 。 我现在得到了表格的滚动条,并且它适合整个可用空间。
I have found the solution. I had to add the Grid on a panel. I had to set the layout of that panel to FitLayout(). Secondly had to call doLayout() on that panel after loading the Store with the data. I now get the scrollbars for the table as well as it fits the whole available space.