-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3583057
By: nobody
Greetings,
What is the best way to dynamically update the cells in a Grid Object? From the docs it does not appear that there is a setValue() method, need something like this to dynamically update the grid data.
Thanks!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3583210
By: henrichen
Hi,
Do you mean change the value of the component in the grid cell or change the component in the grid cell?
Can I suggest providing a simple zuml as an example so it will be easier to discuss.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3583305
By: tomyeh
A grid consists of rows while a rows consists of row. Then each child of row is a cell, which could be anyting.
You might take a look at http://www.xulplanet.com/tutorials/xultu/grids.html
, too.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3584025
By: nobody
Greetings,
Thanks for the help,
Here is a code sample that works for this Use Case, hopefully it will help other newbies trying to do the same thing:
<window title="Test Grid">
<grid id="grid" width="500px" height="100px">
<columns>
<column label="Col1" align="center"/>
<column label="Col2" align="center"/>
<column label="Col3" align="center"/>
</columns>
<rows>
<row>
<label id = "row01" value="Rabbit"/>
<label id = "row02" value="Elephant"/>
<label id = "row03" value="Woodchuck"/>
</row>
<row>
<label id = "row11" value="Aarf"/>
<label id = "row12" value="Aarf"/>
<label id = "row13" value="Gotcha"/>
</row>
</rows>
</grid>
<button label="Update row" onClick="updateRow()"/>
<zscript>
void updateRow() {
row01.setValue("Aarf");
row02.setValue("Aarf");
row03.setValue("Gotcha");
row11.setValue("Rabbit");
row12.setValue("Elephant");
row13.setValue("Woodchuck");
}
</zscript>
</window>
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3585166
By: tomyeh
Would you post this to http://en.wikibooks.org/wiki/ZK/How-Tos ?
Thanks.
Asked: 2006-02-18 03:38:31 +0800
Seen: 820 times
Last updated: Feb 20 '06