简体   繁体   English

GWT 2.4 DataGrid行跨度

[英]GWT 2.4 DataGrid row span

Is it possible to have a DataGrid with a column that contains mixture of different row spans of 2, 4, etc? 是否有可能有一个DataGrid的列包含2、4等不同行跨度的混合? I've come across DataGrid's setTableBuilder() method in CustomDataGrid sample code http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCustomDataGrid 我在CustomDataGrid示例代码http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCustomDataGrid中遇到了DataGrid的setTableBuilder()方法。

However in GWT 2.4, setTableBuilder() method doesn't exist. 但是,在GWT 2.4中,setTableBuilder()方法不存在。 For older GWT, is it possible to achieve row span for DataGrid widget? 对于较旧的GWT,是否可以为DataGrid小部件实现行跨度?

That method was added in commit 642e965, which was released in GWT 2.5 and is present in later versions as well. 该方法已添加到642e965提交中,该提交已在GWT 2.5中发布,并且也存在于更高版本中。 It is not a small commit , as it had to replace entirely how the DataGrid and CellTable were rendering their content with an external system. 不是一个小小的提交 ,因为它必须完全替换DataGrid和CellTable如何使用外部系统呈现其内容。

This API change required a significant refactor of CellTable because CellTable assumed a grid structure with one row per row value, one cell per column, and a structure consisting of a div inside of a td for every Cell. 此API更改需要对CellTable进行重大重构,因为CellTable假定了一种网格结构,其中每行值一行,每列一个单元格,以及每个Cell的td内的div组成的结构。

You might be able to build a custom GWT version off of 2.4 with only this additional patch, or perhaps copy the classes after they were changed and use them with GWT 2.4. 您也许可以仅使用此附加补丁程序从2.4版本构建自定义GWT版本,或者在更改类后复制类并将其与GWT 2.4一起使用。 This seems possible since no changes were made to the compiler, but is not a small change. 由于未对编译器进行任何更改,因此这似乎是可行的,但这并不是一个小小的更改。

Additionally, GWT 2.4.0 is over five years old - there have certainly been many other fixes introduced in the meantime. 此外,GWT 2.4.0已有5年的历史了-在此期间肯定引入了许多其他修复程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM