Data Grids - Column view help
Trevor DeVore
lists at mangomultimedia.com
Wed Apr 15 12:49:04 EDT 2009
On Apr 15, 2009, at 12:35 PM, Ian McKnight wrote:
> ...
>
> Is this the correct way to create a table view of data held in an
> array? Is the first method I tried specifically for tab delimited
> lists?
Hi Ian,
When you set the dgData of a data grid table, the data grid will look
for a column name that matches the name of each key in the array you
assign, titleArray in your case. If you have a column that matches
then the data grid will try to draw the data in your array.
By default the data grid assumes the value of the column is text and a
cell with a field will be created for displaying the text. You only
need to customize the column behavior if you want to display data of
another type.
> And finally I was able to modify the table view by accessing the
> template view of the individual column, which contains a group instead
> of a field (as in the FORM layout), and replacing the field in this
> group with a list field. All works perfectly. But how can I put an
> image into a column? When I modify the column template to include a
> image, the image will not display. I'm trying to take advantage of the
> TABLE's sorting facility.
Does the name of the key in your array that stores the image have a
matching column name? If so, what does your code look like that is
trying to load the image into the column?
I will also mention that you can sort forms as well, you just don't
get the prefab headers. I don't think I've added it to the docs yet
but the call is:
SortDataByKey pKey, pType, pDirection, pCaseSensitive
pKey is the key in your array to sort by.
pType and pDirection are same as options in Revolution sort.
pCaseSensitive should be self explanatory.
Regards,
--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com
More information about the use-livecode
mailing list