Sorting treetable column generated using columngenerator

Hi,

Please check the code below

[code]
TreeTable tt = new TreeTable();
tt.addContainerProperty(“check”, String.class, null);
for (int i = 1; i < 6; i++) {
String parent = "parent - " + i;
tt.addItem(parent);
for (int j = 1; j < 3; j++) {
String child = "child - " + i + j;
tt.addItem(child);
tt.setParent(child, parent);
}
}

tt.addGeneratedColumn(“check”, new ColumnGenerator() {

@Override
public Object generateCell(Table source, Object itemId, Object columnId) {
Label label = new Label();
label.setValue(itemId.toString());
return label;
}
});
[/code]In the UI, clicking on the header doesnot sort the coIumn.
Please check attachment.

Thanks in advance
27732.png