如何在filteringtable vaadin 7中隐藏列?
我的表中有5列,如何使其中一列不可见?这是一种标准的方法吗?或者,我可以使用css吗?您需要允许表中的列折叠如何在filteringtable vaadin 7中隐藏列?,vaadin,vaadin7,vaadin6,Vaadin,Vaadin7,Vaadin6,我的表中有5列,如何使其中一列不可见?这是一种标准的方法吗?或者,我可以使用css吗?您需要允许表中的列折叠 table.setColumnCollapsingAllowed(true); 之后,可以折叠或隐藏任何列 table.setColumnCollapsed("columnId", true); 例如: FilterTable table = new FilterTable("The Brightest Stars"); // Define two columns for the
table.setColumnCollapsingAllowed(true);
之后,可以折叠或隐藏任何列
table.setColumnCollapsed("columnId", true);
例如:
FilterTable table = new FilterTable("The Brightest Stars");
// Define two columns for the built-in container
table.addContainerProperty("Name", String.class, null);
table.addContainerProperty("Mag", Float.class, null);
// Allow column collapsing
table.setColumnCollapsingAllowed(true);
// Hide column "Name"
table.setColumnCollapsed("Name", true);
您需要允许表中的列折叠
table.setColumnCollapsingAllowed(true);
之后,可以折叠或隐藏任何列
table.setColumnCollapsed("columnId", true);
例如:
FilterTable table = new FilterTable("The Brightest Stars");
// Define two columns for the built-in container
table.addContainerProperty("Name", String.class, null);
table.addContainerProperty("Mag", Float.class, null);
// Allow column collapsing
table.setColumnCollapsingAllowed(true);
// Hide column "Name"
table.setColumnCollapsed("Name", true);
如果您根本不想展示它们,请在桌上使用: 设置可见列属性id的数组:s 列在此数组中按其外观顺序显示 参数:
visibleColumns
-显示的属性id的数组:s
(另外,
setContainerDataSource
)允许传递可视列)如果您根本不想显示这些列,请在表上使用:
设置可见列属性id的数组:s
列在此数组中按其外观顺序显示
参数:
visibleColumns
-显示的属性id的数组:s
(另外
setContainerDataSource
)允许传递可访问的列)但不,它不起作用)我的意思是用户仍然可以使它可见)并且用户不应该使它可见(但是不,它不起作用)我的意思是用户仍然可以使它可见)并且用户不应该使它可见是的,但是我需要将它放在表中,因为我在双击其中一条记录时使用它…如果它不在表中,那么我可以使用此值进行进一步处理。例如,是否可以使用css?@vlcod为什么不使用适当的容器(例如BeanItemContainer)?是的,但我需要将它放在表中,因为我在双击其中一条记录时使用它……如果它不在表中,那么我可以使用此值进行进一步处理。例如,是否可以使用css?@vlcod为什么不使用适当的容器(例如BeanItemContainer)?