Basic concepts

NatTable is more than just a table. It is a general framework to create flexible and highly customizable grids.
It is necessary to understand some general concepts to configure and use NatTable.

Layers

A layer is NatTable's way of adding functionality. Each feature usually is implemented by a separate layer.For example column hiding is implemented by the ColumnHideShow layer, Sorting is implemented by the SortHeaderLayer and so on. Layers can be arranged in 'stacks', by piling them on top of each other. Various pre canned stacks are available, for example DefaultBodyLayerStack, DummyGridLayerStack and so on.

Regions

A region is a physical area on the table. Typically the table is divided into the following:

Commands

Commands can be fired on NatTable to invoke behavior. Every user action triggers a command. Commands passed onto layers. A layer decides what kinds of commands it can handle. If it receives a command it understands, it handles it and returns true. If it receives a command it does not understand, it is responsible to passing the command on to its underlying layer(s).

Events

Layers can fire events. Typically once a command is handled by a layer, the layer will fire an event to indicate that a change has occurred. Anyone can register themselves as a listener to layer events by implementing the ILayerListener interface. Note that commands travel down the layer stack, while events travel up the layer stack.

Configuration

Configuration information is held in the following registries.

  1. ConfigRegistry
  2. UiBindingRegistry.

Every Layer has configuration information associated with it. This is in the form of IConfiguration objects. When the table starts up every layer is given the opportunity to configure itself and make entries in the ConfigRegistry and the UiBindingRegistry.