What is the Hierarchical Grid?
Hierarchical Grid extends the Editable Grid and supports all the same features. Additionaly it allows you to display subgrids related to particular cells of the main grid. Editable hierarchicalModel = new HierarchicalGridDataModel(null); // create a new grid panel GridPanel panel = new GridPanel(); // create a new editable grid and put it into the panel HierarchicalGrid grid = (HierarchicalGrid) panel.createEditableGrid ( new String[]{“Department”,”Number of Employees”}, new Class[]{LabelCell.class, IntegerCell.class}, hierarchicalModel ); // add a grid panel factory to the second column grid.addGridPanelFactory( 1,new GridPanelFactory() { public GridPanel create(GridDataModel model) { GridPanel panel = new GridPanel(); // create a new grid here return panel; } public GridDataModel create(int parentRow, GridDataModel parentModel) { return new EditableGridDataModel(new Object[0][0]); } } ); // display all panel.display(); Hierarchical Grid initialization is similar to the previous one.