LiveCode LessonsLiveCode Data Grid Data Grid FundamentalsWhat Is This "Data Grid Templates" Stack That Appeared in My Project?

What Is This "Data Grid Templates" Stack That Appeared in My Project?

A data grid relies on record templates (forms) and column templates (tables) to display data. These templates are merely Revolution controls that will be used to visualize your data. In order to manage these controls the Revolution IDE creates a stack named Data Grid Templates the first time you add a data grid to a card in your stack.

Data Grid Templates Stack

Data Grid Templates Stack

This stack contains a single card for each data grid you add to a stack. Each card contains the template(s) and behaviors that the data grid will use to display the data.

Data Grid Templates Card Contents

Data Grid Templates Card Contents

This screenshot shows some controls that might appear on a Data Grid Templates card. The Row Template (1) is the group that contains a) all of the controls for a form or b) the column templates for a table. The IDE assigns the Row Template group to the dgProps["row template"] property of the data grid.

The Behavior Script button is assigned as the behavior to the Row Template group and is used for data grid forms. This script controls how data is inserted into the Row Template controls and how those controls are positioned.

Opening The Data Grid Templates Stack

Opening The Data Grid Templates Stack

The Revolution IDE makes it easy to locate your templates in the Data Grid Templates stack. Simply select the data grid control and click the Row Formatting... button (1) in the Basic Properties (2) pane of the inspector.

The card containing the template(s) for the selected data grid will open.

0 Comments

Add your comment

E-Mail me when someone replies to this comment