Version:

This lesson is part of the Perspective Components and Bindings course. You can browse the rest of the lessons below.

LESSON LIST

Autoplay Off
Take topic challenge

Supplemental Videos

Description

The Table component allows you to display data from a number of sources and in many different ways. Here we talk about some of the basics like how data is stored in the Table, and how to do some row configuration.

Video recorded using: Ignition 8.0

Transcript

(open in window)

[00:00] The Perspective table component has some neat features that offers some powerful functionality. Now when you first drag a table component on to your view, you'll notice that there's quite a few properties listed in our property editor. As you can imagine, going over all of these properties in a video is going to be really difficult. So as always, you can find more information about the table component in our user manual. Now, one of the most important things about my table component is its data. As what's a table without some data? You'll notice up at the top of my property editor, we find my data property which lets me know that there are 50 records within my table. If I expand my data property, it lists out all of my records in index order. So, this record at zero is going to refer to the first row of Folsom, United States. While the second record at record one is going to refer to the row of Helsinki, Finland. Now, you'll notice that my two records here look a little bit different. For record one, the city, country, and population are simply values that hold the city, country, and population of Helsinki, Finland. However, record zero for Folsom, United States, looks a little bit different. You'll notice that the city is not a value but instead an object which contains other values and objects within it. This is how you can customize the behavior of individual cells within the table. You'll notice because the city object has an editable value inside of it, this particular cell is going to allow me to edit it. It also has a style object which is why the cell for Folsom comes in as a different color. Now, there are two ways to add a new record. First, we can right-click on one of my existing records and go to insert a new object. This is going to insert a new blank object record. So you'll notice now, I have a new record at index two, and it has no items in it. If I wanted it to match with my other rows, I would need to provide that object with values city, country, and population as well as their respective values. It's important to note that what you fill each record with is really up to you. You can insert other values like city and country and population or you can insert in entire objects like style, to change how the cell or row looks, or even objects such as another view. There's a lot of possibilities with each of these cells within the table. Alternately, if I right-click on an existing record, I can also go to duplicate. Duplicate is going to create a duplicate of the record that I had right-clicked on, so now I have two records for Helsinki, Finland. I can simply change the values of one of them with my new values for my new record. Now, one of the really neat features of the table component is its builtin pagination system. You can see by default the table automatically splits up my data in to multiple pages instead of displaying all the data in a long list. If I minimize my data property and scroll down in my property list, we can see that there is an object called pager. In the pager object, there's a lot of other properties and objects where I can configure how the pagination system works within the table. I can alter how many records are initially shown, I can change the location of my pager to be at the top of my table, or I can even hide the pagination system entirely and not use it. These features and more help make the Perspective table component a really powerful asset to your Perspective projects.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.