-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I have a question about how to create a dynamic row in a grid. So that the user can on click event add row to a grid component.
My code is::
[[
<grid fixedLayout="true" id="grid">
<columns>
<column label="ID" width="25%"/>
<column label="Nom et Prénom" width="20%"/>
<column label="Email" width="20%"/>
<column label="N° téléphone" width="20%"/>
<column label="Action" width="15%"/>
</columns>
<rows>
<row>
<textbox value="" width="90%" />
<hbox>
<listbox onSelect="" mold="select" rows="1">
<listitem label=" " value="" />
<listitem label=" " value=" " />
<listitem label="" value="" />
<listitem label="" value="" />
</listbox>
</hbox>
<textbox value="" width="90%" />
<textbox value="" width="90%" />
<div>
<button id="add" sclass="demo-button" tooltiptext="ajouter utilisateur" image="/img/plus.gif" style=" margin-left:1px;" forward="onClick=grid.addRow()"/>
<button sclass="demo-button" tooltiptext="supprimer utilisateur" image="/img/minus.gif" style="margin-left:1px;"/>
</div>
</row>
</rows>
</grid>
Asked: 2009-05-05 09:37:22 +0800
Seen: 339 times
Last updated: May 06 '09