0
我使用Telerik的RadListBox控制我的web应用程序的开发,想知道怎样才能通过TextBox控件添加一行到RadListBox,下面是我的代码片段:如何在Telerik的RadListBox控件上添加和删除行?
<telerik:RadListBox ID="rlbControl" runat="server" SelectionMode="Multiple">
<ItemTemplate>
<table>
<tr>
<td>
<asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' ></asp:Label>
</td>
<td style="width:20px"></td>
<td >
<asp:Label ID="lblAge" runat="server" Text='<%# Eval("Age") %>' ></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadListBox>
Name : <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
Age : <asp:TextBox ID="txtAge" runat="server" ></asp:TextBox>
<asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" />
<asp:Button ID="btnDel" runat="server" Text="Delete" OnClick="btnDel_Click"/>
当添加按钮点击,从两个文本框获取输入并绑定到RadListBox。
对于删除,从RadListBox中选择行并单击删除按钮,从RadListBox中删除选定的行。
我的问题是如何添加和删除行?
谢谢您的高级。
的PL使其回答,如果这个职位帮助ü... – 2013-03-14 03:52:34