Hi
How can I set MULTI_CHECK selection mode in GroupTable
component ?
Hi
How can I set MULTI_CHECK selection mode in GroupTable
component ?
Hi,
Unfortunately, this mode is supported only for DataGrid
UI component. *Table
components do not provide this feature.
ok. I need selection mechanizm which is separate from selection mechanizm in groupTable. I have idea to add virtual colunm with checkbox
component. Do you have any experience in such case ?
ok. Can I add virtual column and do it first and freeze ? How this column influence on groupTable
component in group status.
Generated column can be virtual, it not necessary bound to data. Frozen columns are not supported but you can disable column reordering completely using columnReorderingAllowed
property of Table.
How can I set columnReorderingAllowed
property of Table ?
Use Table.setColumnReorderingAllowed()
method or set reorderingAllowed
XML attribute.
ok I add column by java code. How can I set this column first in table ?
protected void addColumn() {
groupTable.addGeneratedColumn("s", entity -> {
CheckBox cb = componentsFactory.createComponent(CheckBox.class);
return cb;
});
}
In the simplest case just define “s” column in XML as first column, generated column will be added there.
Yes , but I’d like create my browse controller and uses it for all cases in my application. I may add column in XML, but then I have to add this column for each browse. Is it possible to do all in controller’s code ?
Unfortunately, for now you can only call removeColumn()
for all columns and then add columns in the correct order. I’ve filed the issue to improve this: Add ability to add Table column by index · Issue #1523 · cuba-platform/cuba · GitHub
It is strongly recommended that *Table components support this feature!!!
With the current state of Table
implementation it is barely possible. I’d better use DataGrid
for this where we can already use MULTI_CHECK
mode.
There are too many problems with DataGrid to work at all.