带有冻结标题和初始列的GWT CellTable [英] A GWT CellTable with frozen header and initial column

查看:78
本文介绍了带有冻结标题和初始列的GWT CellTable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要冻结CellTable中的第一列和第一行数据,以便用户可以滚动浏览数据,但仍然可以看到轴上的标签。第一列应该在用户上下滚动时滚动,并且当用户向左和向右滚动时标题行应该滚动。在Excel中考虑冻结窗格。



我正在使用GWT 2.1,如果没有解决方案,我愿意编写自己的窗口小部件来完成此操作。我的问题是两方面的问题:


  1. 任何小部件已经有这种行为吗?建议如果我要自己实现这一点?

谢谢!

解决方案

我自己实施了一个解决方案。查看 http://larkolicio.us/ScrollTable/ExperimentTables.html



它是一个包含三个AbsolutePanel的LayoutPanel。冻结的列是CellTable,主要部分是CellTable,头部是网格 - 我无法找到设置CellTable列的宽度的方法! ScrollHandler将主要部分链接到两个冻结部分。有一点点延迟 - 如果有人能找到一种方法来摆脱部分之间的延迟,我会很感激。



我得到了它的工作指出我可以使用它,并停止。它不是一个通用小部件。请随时使用它,风险自负。

I need to freeze the first column and first row of data in a CellTable, so that users can scroll through the data but still see the labels on the "axes." The first column should scroll when the user scrolls up and down, and the header row should scroll when the user scrolls left and right. Think "Freeze Panes" in Excel.

I'm using GWT 2.1 and am willing to write my own widget to do this if no solutions already exist. My question is a two-parter:

  1. Do any widgets already have this behavior?
  2. Any suggestions if I'm going to implement this myself?

Thanks!

解决方案

I implemented a solution myself. Check out http://larkolicio.us/ScrollTable/ExperimentTables.html

It's a LayoutPanel with three AbsolutePanels inside it. The frozen columns are a CellTable, the main part is a CellTable, and the header is a Grid - I could find no way to set the width of a CellTable column! A ScrollHandler links the main part to the two frozen parts. There is a little bit of delay - I'd appreciate it if someone could find a way to get rid of the lag between the sections.

I got it working to a point that I could use it, and stopped. It is not a general-purpose widget. Please feel free to use it at your own risk.

这篇关于带有冻结标题和初始列的GWT CellTable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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