Hello,
I want to transfer an item in a listbox to another listbox like in this example : http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/templates/defaultcs.aspx
My problem is when I transfered an item in the second lisbox the item is empty (see the attached file).
Have you a solution ?
Thanks.
I want to transfer an item in a listbox to another listbox like in this example : http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/templates/defaultcs.aspx
My problem is when I transfered an item in the second lisbox the item is empty (see the attached file).
<telerik:RadListBox ID="RLB_References" runat="server" Width="360px" TransferToID="RLB_SelectedReference" AutoPostBackOnTransfer="True" AllowTransfer="True" OnTransferred="RLB_References_Transferred"> <HeaderTemplate> <table> <tr> <td width="80px">Titre</td> <td width="80px">Référence</td> <td width="80px">Taille</td> <td width="80px">Coloris</td> </tr> </table> </HeaderTemplate> <ItemTemplate> <table> <tr> <td width="90px"> <%# DataBinder.Eval(Container.DataItem, "Titre") %> </td> <td width="90px"> <%# DataBinder.Eval(Container.DataItem, "Reference") %> </td> <td width="90px"> <%# DataBinder.Eval(Container.DataItem, "Taille") %> </td> <td width="90px"> <%# DataBinder.Eval(Container.DataItem, "Coloris") %> </td> </tr> </table> </ItemTemplate></telerik:RadListBox><telerik:RadListBox ID="RLB_SelectedReference" runat="server" Width="400px"> <HeaderTemplate> <table> <tr> <td width="80px">Titre</td> <td width="80px">Référence</td> <td width="80px">Taille</td> <td width="80px">Coloris</td> <td width="80px">Quantité</td> </tr> </table> </HeaderTemplate> <ItemTemplate> <table> <tr> <td width="80px"> <%# DataBinder.Eval(Container.DataItem, "Titre") %> </td> <td width="80px"> <%# DataBinder.Eval(Container.DataItem, "Reference") %> </td> <td width="80px"> <%# DataBinder.Eval(Container.DataItem, "Taille") %> </td> <td width="80px"> <%# DataBinder.Eval(Container.DataItem, "Coloris") %> </td> <td width="80px"> <telerik:RadNumericTextBox runat="server" ID="QuantityTextBox" Width="50px" MinValue="1" ShowSpinButtons="true" Value="1" NumberFormat-DecimalDigits="0"> </telerik:RadNumericTextBox> </td> </tr> </table> </ItemTemplate></telerik:RadListBox>private string GetArticleTitle(int nodeId) { return "title"; } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { List<tbl_references> references = null; using (ReferenceContainer context = new ReferenceContainer()) { references = context.tbl_references.ToList(); } var datasource = from r in references let reference = r.Reference let taille = r.Taille let coloris = r.Coloris let titre = GetArticleTitle(r.ArticleNodeId) select new { Reference = reference, Taille = taille, Coloris = coloris, Titre = titre }; RLB_References.DataSource = datasource; RLB_References.DataBind(); } } protected void RLB_References_Transferred(object sender, Telerik.Web.UI.RadListBoxTransferredEventArgs e) { foreach (RadListBoxItem item in e.Items) { item.DataBind(); } }Have you a solution ?
Thanks.
