TDashboardCanvas

Dashboard card canvas container using CSS Grid. Displays TCard components in a responsive grid layout with automatic mobile stacking.

DashboardCSS GridResponsive

Overview

TDashboardCanvas manages a collection of dashboard cards using CSS Grid layout. It handles card creation from datasets, embedding forms into cards, and responsive behaviour.

Key Published Properties

PropertyTypeDescription
ActiveDashboardTDashboardThe dashboard data model containing card definitions.
LayoutDataSetTAPIDataSetDataset containing card layout information.
FormManagerTFormManagerManages form embedding into cards.
SpanAcrossIntegerDefault number of grid columns (default: 3).
SpanDownIntegerDefault number of grid rows (default: 3).
DashboardModeTDashboardModemdDisplay (normal) or mdLayout (editing).
HeaderStyleTHeaderStyleStyle for card headers.

Key Methods

FUNCTION LoadCards: Integer;

Loads cards from LayoutDataSet and renders them. Returns number of cards created.

FUNCTION RenderDashboard: Integer;

Renders all cards in the CSS Grid layout.

PROCEDURE ClearCanvas;

Removes all cards from the canvas.

PROCEDURE EmbedFormInCard(CardNumber: Integer; FormName, Title, SubTitle: STRING; TileId: Integer);

Embeds a form into a specific card by card number.

Responsive Behaviour

TDashboardCanvas uses TDom for viewport tracking:

IThemeSubscriber

TDashboardCanvas implements IThemeSubscriber and receives theme updates to style the grid background and borders.