0

Dynamic Update of Grid Cells

asked 2006-02-18 03:38:31 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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!

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2006-02-18 07:21:10 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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


link publish delete flag offensive edit

answered 2006-02-18 10:12:13 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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.

link publish delete flag offensive edit

answered 2006-02-19 01:00:11 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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>


link publish delete flag offensive edit

answered 2006-02-20 07:16:10 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2006-02-18 03:38:31 +0800

Seen: 820 times

Last updated: Feb 20 '06

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More