I'm trying to implement a group by on multiple columns:
I create the ORIG, DEST columns like this,
I have group summary and grid summary enabled on some other columns.
I don't get anything in the log and especially for LIST GRID component. Am I missing something here ?
thanks.
Code:
final ListGrid listGrid = new ListGrid() { @Override protected MenuItem[] getHeaderContextMenuItems(final Integer fieldNum) { final MenuItem[] items = super.getHeaderContextMenuItems(fieldNum); MenuItem customItem = new MenuItem("Group by Origin, Destination"); customItem.addClickHandler(new ClickHandler() { public void onClick(MenuItemClickEvent event) { ((ListGrid)event.getTarget()).groupBy("ORIG","DEST"); } }); MenuItem[] newItems = new MenuItem[items.length + 1]; for (int i = 0; i < items.length; i++) { MenuItem item = items[i]; newItems[i] = item; } newItems[items.length] = customItem; return newItems; } };
Code:
ListGridField origin = new ListGridField("ORIG", 100); ListGridField destination = new ListGridField("DEST", 100);
I don't get anything in the log and especially for LIST GRID component. Am I missing something here ?
thanks.
Comment