Description and Features List

Customizable grid controls simplify grids management and provide reliable UI

Customizable grid controls simplify grids management and provide reliable UI

Grid Panel, Pager, and Grid Toolbar are additional GWT widgets which simplify grids management. You can use the grids without these components and / or develop your own prototypes but the best practice is to apply them the following purposes:

  • Grid Panel. It's a layout widget for the grids. It also creates new grids, pagers and toolbars and handle events
  • Pager. It is a control widget that displays a list of availbale pages and allows switching grid views between them
  • Grid Toolbar is a component which displays grid control buttons

Note that the next features currently supported:

  • grid paging controls
  • grid rows management (saving, adding, removing, etc)
  • centralized grid event (mouse and keyboard) handling
  • factory methods to create new grid instances
  • facade methods to control the nested grid
  • centralized columns resizing
  • customizable grid toolbar
The last feature means that you don't have to invoke the SimpleGrid.resize() mathod manually Grid Panel will do for you every time when onLoad event sent.

Sample

The next sample shows how to create a new Grid Panel and control Pager and Grid Toolbar displaying.


GridPanel panel = new GridPanel();

panel.setTopPagerVisible(false); // switch off the top pager
panel.setBottomPagerVisible(true); // switch on the bottom pager
panel.setTopToolbarVisible(false); // switch off the top toolbar
panel.setBottomToolbarVisible(true); // switch on the bottom toolbar

panel.setInvisibleColumn(0, true); // set the first column invisible
panel.setSortableColumn(1, false); // make the second column non-soirtable
panel.setReadonlyColumn(2, true); // make the third column read only

Some methods of the Grid Panel actually delegate invocations to the nested grid methods.