For those who have trouble making grouping on the grid. Please create a global variable for the initial declaration: Example:
private GroupingStore storeGrouping
Then in the initial grid section is added :
storeGrouping.groupBy("name_grouping");
At the bottom then added :
final ColumnModel cm = new ColumnModel(config); GroupingView view = new GroupingView(); view.setForceFit(true); view.setGroupRenderer(new GridGroupRenderer() { public String render(GroupColumnData data) { String f = cm.getColumnById(data.field).getHeader(); String l = data.models.size() == 1 ? "Item" : "Items"; return f + ": " + data.group + " (" + data.models.size() + " " + l + ")"; } }); EditorGrid<SaveItem> grid = new EditorGrid<SaveItem>(store, cm); grid.setView(view); grid.setBorders(true);
In order for the datagrid to be grouped and sorted by the beginning or alphabetical order numbers at the beginning