DataFrame Layouts
SQL Frames already provides several options to display DataFrames. In addition to the rich polymorphic UI, it is also possible the rendering via formatters and renderers both at the cell and row level. However, sometimes it is simply desirable to display the data in a non-tabular format. Card layout is a great example of such a display typically used in product catalogs.
It is possible to achieve the card layout using the df.ui.addLayout()
API.
When layouts are added, the Data
menu contains a Layouts
section providing the ablity to
toggle among the different layouts including the default table layout.
Layout View types
Data Frame Layouts have a view type. The default view type is Tabular (t
). The other view type
currently supported is Workspace (ws
).
Workspace
Workspace (Multi-record)
It is possible for the workbench to show multiple record details at the same time. Each record is displayed in a separate tab.
Default Workspace View
Just specifying the id fields (and optionally header fields) for a DataFrame automatically creates a default workbench view as shown below.