View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Tables Vs Datasets

My misconception

When I first started doing the UI for our project (Ecode), I need to find a way to display few items in a table format. I saw a table icon on the palette and thought that would work for me. it really didn't. I ended up using a dataset. so read below to save yourself some time and know which one fits better your needs. I provided few resources to help with both of them :) Good luck and have a great semester!

Although tables and datasets look similar, I found a major difference between the two.

The Difference

If you have some existing information that you want to display in a table format such as an existing users list to a system with their info or a phonebook information (name, phone), then a table is a good idea. It expects a 2DList with all the data. The thing you want to be aware of it that you canít update it. Well, let me re-phrase that :) you can, but itís tedious. The 2Dlist cannot be extended. Once you create one of a certain size, you can make it grow. You can always copy all your element to a new list that can hold one extra item, and then add the new one to the end, but itís obviously not efficient!

So, if you want to display some contents and update them as you go, your best choice would be a dataset. Letís say you want to organize the items in a shopping list. You would want to update the contents of the list (item description, price, quantity, Ö) as you go. The dataset takes a list that enables you to add an element to it.

How to do it?

The GuiDevGuide is a great resource. It is located at:
C:\Program Files\Cincom\vw7.4.1nc\Doc
(assuming you did install the visual works under C:\Program Files)

It doesnít provide with all the details, but it definitely gets you started off with your GUI design. There examples about how to do many useful things. The examples are not very details but you can always look at the code, copy it, and tweak it around to get it to do what you want.

Few more details about the Dataset

Getting back to the dataset, the list that populated it can be a list of objects. For our earlier example, letís say a list of Item objects. If you look at the examples folder located at: C:\Program Files\Cincom\vw7.4.1nc\Examples youíll find 4 files called dataset1, dataset2, dataset3, and dataset4. The most complex is dataset4. Also, there are examples for tables in the same folder. your can use your file browser, under the file tab menu from visual works to open this folder and then right click on the file and click Ďfile iní. After itís loaded youíll see it to the left most list window that shows all your existing packages. You can run it, look at the code, an even edit the UI to see how the dataset uses the list.

The following document will be helpful when using a dataset
ē GUI Developerís guide Ė pages 238-248.
This one when using a Table
ē GUI developer's guide - pages 318-350
I would suggest reading or going through this document, if you are creating a GUI (canvas) for the first time.
ē Walk through Ė pages 21- 64
This document will provide more detailed information about canvas. Refer to as needed.
ē AppDevGuide
All these documents are in C:\Program Files\Cincom\vw7.4.1nc\Doc
(assuming you did install the visual works under C:\Program Files)

Links to this Page