jeudi 12 février 2015

How to set custom group header text in GXT grid

I have got a grid with grouping possibility. The grouping column is defined as follows:

Code:



descriptionColumn = new ColumnConfig<>(elementProps.description());

I wanted to set a custom text in the grouping header but somehow only the content of the grouping column is changed when I override the render method.

Code:



descriptionColumn.setCell(new AbstractCell<String>() {

@Override
public void render(Context context, String value, SafeHtmlBuilder sb) {
MyDto dto = store.get(context.getIndex());

if (dto != null) {
String summary = StringUtils.provideSummary(dto);
sb.appendHtmlConstant(summary);
}
}
});

Any ideas how I can set the same text in the grouping header as in the grouping column?






How to set custom group header text in GXT grid

Aucun commentaire:

Enregistrer un commentaire