-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I'd like to know if it's possible to bind a collection of objects for each different cell on a grid, instead of binding each row of it:
I have this grid (one object per row):
<grid model="@load(objects)">
<columns>
<column label="Person"/>
<column label="Person"/>
</columns>
<rows>
<template name="model" var="obj">
<row value="@bind(obj)">
<label value="@load(obj.name)"/> <!-- John Doe -->
<label value="@load(obj.name)"/> <!-- Jane Doe -->
...
</row>
</template>
</rows>
</grid>
I'm looking for something like (as many as possible):
<grid model="@load(objects)">
<columns>
<column label="Person">
<column label="Person">
</columns>
<rows>
<template name="model" var="obj">
<row>
<label value="@load(obj.name)"/> <!-- John Doe --> <!-- Jane Doe -->
<label value="@load(obj.name)"/>
... </row> </template> </rows> </grid>
Hello psinalberth,
You could use a RowRenderer as shown below:
https://www.zkoss.org/zkdemo/grid/dynamic_renderer
Best Regards,
Darksu
Thanks Darksu I'll try later. At the moment I'm using a wire grid, so I'm appending the objects by grid.getCell(row, column).appendChild(myComponent)
.
Asked: 2016-10-28 01:23:48 +0800
Seen: 35 times
Last updated: Nov 07 '16
Editable interface to add users
grid with extra data fetcht from webservice [closed]
Problem binding values to a composite component
How to access static member field of a class in zul without zscript
How can i load a constant in .zul
MVVM Validator: class not found ? [closed]
MVVM tab box - delay @load until tab pane displayed?
mvvm, load or save with after or before for seach command
how to fire an event when a variable value loaded through VM
Difficult to answer but I'm thinking you need to search for children attribute.
chillworld ( 2016-10-28 06:41:32 +0800 )edit