我想在scout eclipse中添加Table中的总行数。
我知道我可以添加新行并在末尾添加总和,但我想要的是该行将浮动在表的底部。
这意味着总数不会是最后一行,但总是在底部。 (即使只有一行)。
答案 0 :(得分:0)
您可以在导入表格数据后添加一行并计算总和(例如:在execLoadData
中)。
要将行保留在底部,请添加AbstractIntegerColumn
类型的不可显示列,并添加最低排序索引0
。然后,使用0
填充所有常规行的值,并使用1
填充sum列的值。
@Order(5.0)
public class SortColumn extends AbstractIntegerColumn {
@Override
protected boolean getConfiguredDisplayable() {
return false;
}
@Override
protected int getConfiguredSortIndex() {
return 0;
}
}