@Override protected void onMouseDown(GridEvent<ModelData> ge) { super.onMouseDown(ge); El hd = ge.getTarget(".x-grid-group-hd", 10); if (hd != null) { ge.stopEvent(); toggleGroup(hd.dom.getParentElement(), isGroupExpanded(hd.dom.getParentElement())); } }
private void onBeforeRowSelect(SelectionEvent<ModelData> se) { if (!enableGrouping) { return; } Element row = getRow(se.getIndex()); if (row != null) { Element g = findGroup(row); toggleGroup(g, true); } }
/** * Toggles all groups. * * @param expanded true to expand */ public void toggleAllGroups(boolean expanded) { NodeList<Element> groups = getGroups(); for (int i = 0, len = groups.getLength(); i < len; i++) { toggleGroup(groups.getItem(i), expanded); } }