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

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

问题描述

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

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.

我正在使用 GWT 2.1,如果尚无解决方案,我愿意编写自己的小部件来执行此操作.我的问题分为两部分:

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. 是否有任何小部件已经具有此行为?
  2. 如果我要自己实现,有什么建议吗?

谢谢!

推荐答案

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

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

这是一个 LayoutPanel,里面有三个 AbsolutePanel.冻结的列是 CellTable,主要部分是 CellTable,标题是 Grid - 我找不到设置 CellTable 列的宽度的方法!ScrollHandler 将主要部分链接到两个冻结部分.有一点延迟 - 如果有人能找到一种方法来消除部分之间的延迟,我将不胜感激.

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天全站免登陆