What is the Data Grid?

The Data Grid control enables you to integrate powerful tables and forms into your LiveCode projects. Data grids combine groups and behaviors to provide you with a simple, yet flexible means of displaying your data in just about any way you want.

A Data Grid Table

A Data Grid Table

The table style of a data grid allows you to display your data in a modern looking table complete with headers, sorting, column alignment and more. By default a data grid table will use a LiveCode field to each column of each row. If you need to customize a column with graphics you can define your own templates for each column. A custom template can be any LiveCode control such as a graphic or group.

A Data Grid Form

A Data Grid Form

The form style of a data grid (1) is similar to a list field (2) in LiveCode in that it allows you to display records from a data source (text file, database, XML, etc.) that the user can select.

The difference is that the data grid uses a group as a template for each record. This means that for each record you display you can create rich user interfaces using menus, images, etc.

The data grid form is also very fast as it only draws the records that are currently visible on the screen. This means you can display large records sets without slow performance.

Because the data grid form is so easy to use it is not only limited to displaying lots of records. Any list where you want a rich UI and complete control over layout and processing of engine events can benefit from being displayed using a data grid form.



Use of the term "form" here is confusing. When I think of a "form" I think of something like a data entry form: it is laid out with fields and labels and is generally a singular thing - you fill it out and enter it. What is described here as a "form" is a list: a collection of records displayed in a repeating fashion on the page. So in my mind you have described data grid lists and tables, the only difference being that lists have 1 column and tables have many. Or, am I missing the point and something else is being described?

Heather Laine

I guess "form" means different things to different people and in different contexts. In this context it is being used to mean "formatted list".


I believe there is an error in the above text:
"The table style of a data grid allows ..."

Should it actually read:
"The table style of a data grid FORM allows...

Elanor Buchanan

Hi Rachel

There are 2 styles of DataGrid 'table' and 'form'. The descriptions here are really trying to describe the differences between the two styles of the DataGrid control. A DataGrid can be either a DataGrid table *or* a DataGrid form.

I hope that is a little clearer.

Kind regards


Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.