0

How to add a new row to a grid?

asked 2009-05-05 09:37:22 +0800

merys gravatar image merys
9

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>

delete flag offensive retag edit

3 Replies

Sort by » oldest newest

answered 2009-05-06 11:51:30 +0800

Hari gravatar image Hari
9

hi merys,

i had created the row and add dynamically through programaticaly...if u want i can give u the code....

link publish delete flag offensive edit

answered 2009-05-06 15:17:28 +0800

merys gravatar image merys
9

Thanks hari for reply,

now Isucceed to add row to a grid, i'm working now how to remove a row from a grid.

link publish delete flag offensive edit

answered 2009-05-06 16:23:16 +0800

dastultz gravatar image dastultz
797 8

As always, it's helpful to share the solution.

/Daryl

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: 2009-05-05 09:37:22 +0800

Seen: 337 times

Last updated: May 06 '09

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