Loading properties in a DataGrid on another card
Posted: Sat Oct 17, 2009 3:54 am
How would one go about changing the dgprops or dgdata of a datagrid on a card that hasn't yet been shown?
In the following scenario the button to load data appears on card1 and the DataGrid itself is on card2
Script 1 works:
Script 2 fails:
I have a test stack set up which I'll gladly email to anybody who wants to give it a try. Tested on OSX & XP rev 3.5 (some weirdness on XP) and 4 dp4
Best Regards
Chris
In the following scenario the button to load data appears on card1 and the DataGrid itself is on card2
Script 1 works:
Code: Select all
go to card "card2"
set the dgprops ["columns"] of group "DataGrid 1" to tcColumnNames
set the dgprops ["column labels"] of group "DataGrid 1" to tcColumnLabels
set the dgprops ["column visibility"] of group "DataGrid 1" to tcColumnVisibility
set the dgprops ["column widths"] of group "DataGrid 1" to tcColumnWidths
--Yuk! screen updating is shown
Code: Select all
--loading data takes a few seconds so show loading GIF
set the visible of image "OSXSpinnerGIF" to true
set the dgprops ["columns"] of group "DataGrid 1" of card "card2" to tcColumnNames
set the dgprops ["column labels"] of group "DataGrid 1" of card "card2" to tcColumnLabels
set the dgprops ["column visibility"] of group "DataGrid 1" of card "card2" to tcColumnVisibility
set the dgprops ["column widths"] of group "DataGrid 1" of card "card2" to tcColumnWidths
set the visible of image "OSXSpinnerGIF" to false
go to card "card2"
I have a test stack set up which I'll gladly email to anybody who wants to give it a try. Tested on OSX & XP rev 3.5 (some weirdness on XP) and 4 dp4
Best Regards
Chris