如何使用jquery在Repeater控件中添加新行 [英] How to add new row in Repeater control using jquery

查看:149
本文介绍了如何使用jquery在Repeater控件中添加新行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个转发器控件

I have this repeater control

<div id="repeterDiv">
    <table class="grid">
         <asp:Repeater ID="Repeater1" runat="server" ClientIDMode="Static">                                    <HeaderTemplate>
                <table>
                     <tr>
                       <td>HSCode</td>
                       <td>Inhalt</td>
                       <td>Amount</td>
                     </tr>
                 </table>
</HeaderTemplate>
<ItemTemplate>
   <table class="elementTable,grid">
    <tr>
      <td>
        <asp:TextBox ID="txtGHSCode"  runat="server" ClientIDMode="Static" Width="100px"> </asp:TextBox>
      </td>
      <td>
        <asp:TextBox ID="txtGInhalt" CssClass="textboxType" runat="server" ClientIDMode="Static" Width="60px"></asp:TextBox>
 
   </td>
                                                               
   <td>
    <asp:TextBox ID="txtGAmount" runat="server" Enabled="false" Width="100px"></asp:TextBox>
   </td>
                                                                
   </tr>
 </table>
</ItemTemplate>
 
</asp:Repeater>
</table>
</div>



现在文本更改txtGAmount,我想在同一个转发器中添加其他行来为HsCode添加更多数据,inhalt。

并将previos数据保存在相同的文本框中。

例如。



HSCode Inhalt金额

1 )123 1 20(在文本更改ogtxtGAmount)

想要使用jquery显示3个文本框以输入更多数据。





想要输出: -

HSCode Inhalt Amount
1)123 1 20

2)(文本框)(文本框)(文本框)



是任何一个我很快就会解决这个问题。

谢谢。


now on text change of "txtGAmount" , I want to add other row in same repeater to add more data for HsCode , inhalt.
and save the previos data on same textboxes.
eg .

HSCode Inhalt Amount
1) 123 1 20 (on text change og "txtGAmount")
want to show 3 text boxes using jquery to enter more data.


want output :-
HSCode Inhalt Amount
1) 123 1 20
2) (textbox) (textbox) (textbox)

is any one have solution for this .reply soon.
Thankx.

推荐答案

参考:

1. 如何到添加一个排-在中继器 - 使用-jquery的 [ ^ ]

2. add-dynamic-row-using-repeater [ ^ ]
Refer:
1. how-to-add-a-row-in-repeater-using-jquery[^]
2. add-dynamic-row-using-repeater[^]


这篇关于如何使用jquery在Repeater控件中添加新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆