GWT 中的海量数据网格
我看过数据网格的自定义实现,但没有一个具有我需要的资源,它们是:行的实时更新(最后的条目将位于表的顶部,即 LIFO),添加像 CheckBox、Button 这样的小部件、 ComboBox...并且使用 Scroll 而不是 Pager(表将一次容纳大量条目;事实上,最后一个要求只是一个偏好,但并不那么重要)。
所以我有两个问题,是否有一个已经实现的解决方案(我已经知道来自 SmartGwt 的 LiveGrid 等实现,或 Grid 来自 Vaadin、GXT...等,我想要的是一个主要利用的实现GWT 用户库,因为我想毫无麻烦地自定义它的 CSS),如果我尝试实现这一点,使用 CellTable 或 Grid 哪个更好?
I have looked at custom implementations of data grids, but none had the resources I need, they are: live update of rows (the last entries are going to be on top of the table, that is LIFO), adding Widgets like CheckBox, Button, ComboBox... and that uses a Scroll instead of a Pager (the table is going to hold a lot of entries at a time; in fact, this last requirement is just a preference, but not so important).
So I have two questions, if there is an already implemented solution (I already know implementations like LiveGrid from SmartGwt, or Grid from Vaadin, GXT... etc, what I want is an implementation which mainly makes use of GWT user library, because I wanna customize its CSS without trouble), and if I try to implement this, what would be better to use, CellTable or Grid?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您:
然后就和网格一起去吧。
与 CellTable 一样,Grid 没有内置标头支持。 CellTable 专为大型数据集而设计,但专门呈现整个数据集和/或使用新数据更新表。增量添加行(尤其是在顶部)在 Grid 中速度很快,因为在 JavaScript 中将元素添加到 DOM 的方式。
如果你的表变得非常大,Grid将会占用更多的内存,因为与CellTable相比开销更大。使用 Grid,您可以将 Widget 放入其中,而 CellTable 使用 Cell,它基本上是直接放入 CellTable 的纯 HTML。
If you:
Then go with Grid.
Grid has no build in header support as with CellTable. CellTable is designed for large datasets, but to specifically render the whole data set and/or update the table with new data. Incremental adding rows, especially at the top is fast in Grid, because the way elements are added to the DOM in JavaScript.
If your table becomes very large, Grid is will take more memory, because the overhead is larger compared to CellTable. With Grid you put Widgets in it, while CellTable uses Cell's which is basically plain HTML put directly into the CellTable.