Layouts

Summary

  • AdapTable uses Layouts to manage sets of columns and column-related information
  • At least one Layout must be provided in Initial Adaptable State
  • Layouts are designed to enable users easily to switch between different column setups in their grid
  • Layouts typically contain column visibility and order information but can also include details about column:
    • sorting
    • row grouping and aggregations
    • column and grid filters
    • size / widths
    • pinning
  • Users can create 2 types of Layouts:
    • Table Layouts - standard rows and columns
    • Pivot Layouts - displayed when AG Grid is in Pivot Mode and showing pivoted data
  • Object Tags can be leveraged to extend Layouts by associating some Adaptable Objects with a given Layout

Layouts are the primary way in AdapTable to manage Columns and Column-related info.

They allow users to switch quickly between multiple, different, named, column set-ups in AG Grid.

Note

AdapTable updates Layouts automatically in response to changes being made in AG Grid.

Caution

  • AdapTable requires there is always a "Current Layout" which defines (and saves) the current Column setup
  • Likewise AdapTable mandates that at least one Layout to be defined in Initial Adaptable State.

Layouts include multiple column-related properties including row grouping, aggregations, pinning, widths etc

By default, Layouts do not include styling or formatting information, i.e. all styles are available to all Layouts.

Hint

However this can be achieved, if needed, by using Extended Layouts which can include Styles and other objects

Table & Pivot Layouts

AdapTable provides 2 types of Layouts:

  • Table Layouts - used when accessing AG Grid in "normal" column mode
  • Pivot Layouts - opens AG Grid in pivot mode displaying pivot, row-grouping and aggregation columns
Basic Layout
Fork
  • This example contains 3 Layouts:
    • Standard Layout - a Table Layout containing a list of Columns
    • Grouped Layout - a Table Layout which is Row Grouped by the Language Column and contains 2 Aggregations
    • Pivot Layout - a Pivot Layout with Grouping, Pivoting and Aggregations
Try It Out
  • Switch between the 3 Layouts in the Dashboard (or Status Bar)
  • Click the Layout button in the Dashboard to open the Layout Wizard
  • Create a new Layout and choose which columns you would like to see

Layout Contents

A Layout contains a number of important column-related properties.

Hint

The Columns in the Layout can include "Special Columns" - i.e. Calculated, FreeText or Action Columns

The contents of Table and Pivot Layouts are fairly similar, with just a few differences:

ItemTable LayoutPivot Layout
Name
Table Columns
Pivot Columns
Column Visibility
Column Sizing
Column Sorts
Column Pinning
Row Groups
Expanded Row Group Info
Aggregations
Column Filters
Grid Filter
Expanded Column Group Info
Row Summaries
Total Rows
Total Columns
SuppressAggFuncInHeader
Auto Size Columns
Tags & MetaData

Find Out More

See Table Layouts and Pivot Layouts for step by step instructions in defining the 2 types of Layouts

Deep Dive

Upgrading to Layouts in AdapTable 20 and 21

Extending Layouts

By default, Layouts are simply sets of column visibility, order and related column properties.

They do not include other Adaptable Objects, and everything in Adaptable State is available in all Layouts.

Note

In other words, Layouts do not include styling or formatting information nor have a concept of Scope

For some use cases this can be too restrictive - users might require some AdapTable Objects (e.g. styles, Alerts, Reports etc.) to be applicable to one Layout but not to another.

This can be accomplished via Object Tags which leverage the Tags property found in each Adaptable Object.

Find Out More

See Extending Layouts with Object Tags for more information and demos

Using Layouts

Run-time access to Layouts is primarily available in the Layout section of the Settings Panel.

Note

This displays a list of existing Layouts with buttons to edit, clone, share or delete each Layout.

There is also an Add button to enable run-time Users to create new Layouts via the Layout Wizard.

Special Behaviour

Because of their complexity and central importance, Layouts differ from many other AdapTable Objects in how they can be managed.

Some of the unique features of managing Layouts at run-time include:

  • Cloning: Layouts can be cloned via a Clone button in each Layout; this opens the Layout Wizard with the contents cloned from the Layout but the Name of the new Layout left blank

  • Suspending: Unlike with most Adaptable Objects, Layouts cannot be suspended

  • Saving: Like all Adaptable Objects, Layouts save automatically when relevant changes are made in AG Grid

  • Sharing: AdapTable will share Layouts using Team Sharing

Note

This will also share any AdapTable objects which the Layout references, e.g. Calculated or FreeText Columns

  • Deleting - Layouts can be deleted (if Permissions allows) but as there must always be one Layout, AdapTable will prevent the last Layout in Adaptable State being deleted

Layout Wizards

AdapTable provides Layout Wizards to help run-time users create or edit Layouts in a series of steps.

Find Out More

See Table Layout Wizard or Pivot Layout Wizard for full instructions on configuring Layouts at runtime

UI Entitlements

The UI Entitlements behaviour for Layouts is slightly more complicated than for other Modules, because Layouts are intrinsic to how AdapTable works. The rules are as follows:

  • Full Entitlement - everything works as expected and nothing is hidden or disabled.

  • ReadOnly Entitlement - existing Layouts can be selected, but Users cannot add, clone or delete them, nor edit them in Layout Wizard

Caution

  • Layouts are modifiable at run-time by users resizing / moving Columns in the UI or AG Grid Columns ToolPanel
  • However changes made to the Layout will not be persisted into State (nor available when the app next loads)

Hint

It is possible to prevent any changes to the Layout but not by using Entitlements, but instead to:

  • Set up strict, initial Column Schema definitions in GridOptions that prevent undesired modifications
  • Or mark the Layout with ReadOnly set to true and AdapTable will prevent any changes as much as possible
  • Hidden Entitlement - Layouts - and all Layout-related UI controls - are hidden from the User.

Note

  • You still need to define at least one Layout (though the Layout UI controls will be invisible to the User)
  • AdapTable will update and persist the Layout as AG Grid changes, and re-load it on application re-start

Read-Only Layouts

Like all Adaptable Objects, Layouts can be set with ReadOnly as true.

However, given the nature of Layouts this is more limited than with other objects.

Advanced Layouts

There are many advanced use cases regarding Layouts which AdapTable supports. These include:

Logging Layout Changes

AdapTable provides additional and specific logging capability for Layouts.

This logs to the console details of all changes to any Layout.

Find Out More

See Logging Layout Details for full details

FAQ

Is there a limit on the number of Layouts allowed? No, you can create as many Layouts as you wish but you must always have at least one Layout. AdapTable will prevent you from deleting the last Layout in your state.

Can my colleague use the same Layout as me? Yes, if Team Sharing is enabled, then you can upload your Layout so that your colleague can also access it.

Does a Layout include which column(s) is currently sorted? Yes, this is included in the layout since version 16

Does a Layout include pivoting? Yes.

Can a Layout included multiple sorts? Yes.

Does a Layout include information about column widths or pinning? Yes it can - and it will be updated and saved automatically as the Layout changes.

Why do I not see all my Columns in the Aggregations or Grouping steps in the Layout Wizard? AdapTable follows the same rules as AG Grid for what can be set in the UI. This is based on the properties that have been set in the Column's definition in AG Grid GridOptions:

  • The Row Groups step lists all Columns it defines as Groupable - where enableRowGroup is set to true
  • The Aggregations step lists all Columns it defines as Aggregatable - where enableValue is set to true

Is every Layout editable and deletable? Yes, assuming that your Entitlements AccessLevel property for Layouts is Full.

Can I include Format Columns, Reports and other elements in my Layout? Not directly, because a Layout only includes Column-related information. But you can extend Layouts by leveraging object tags to achieve the same effect.

Why do the Columns in my Layout "jump back" after I move them? Check that the Layout is not set to ReadOnly; if it is, AdapTable tries to prevent any changes to the Layout.