GWT 2.1 CellTable列标题单击事件 [英] GWT 2.1 CellTable Column Header click events
问题描述
是否有任何方法将clickHandlers(或任何类型的处理程序)添加到 CellTable ?我想为我的CellTable添加一些排序功能,并且我在栏或标题类将允许这样做。我使用了这篇文章来了解如何使用CellTable。
Is there any way to add clickHandlers (or any type of handler) to the headers of the columns in a CellTable? I want to add some sorting functionality to my CellTable and I dont see any methods in the Column or Header classes that will allow this. I used this post to figure out how to use the CellTable.
推荐答案
CellTable上还没有支持Sort的方式。然而,有一个手动解决方法涉及到很多代码苦差事。请参阅开支样本下的自行车棚中的类 SortableHeader
和 SortableColumn
。您可以在 com.google.gwt.sample.expenses.gwt.client.ExpenseDetails
中找到用法。您可以使用它,直到下一个版本发布具体内容为止。
There is no out of the box way of supporting sort as yet on the CellTable. However there is a manual workaround involving a lot of code drudgery. Refer the classes SortableHeader
and SortableColumn
in the bike shed under expenses sample. You will find the usage in com.google.gwt.sample.expenses.gwt.client.ExpenseDetails
. You can use this until something concrete comes out in the next release.
检出目录: http:// google-web-toolkit。 googlecode.com/svn/trunk/bikeshed
这篇关于GWT 2.1 CellTable列标题单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!