radlistbox multi column

2 posts, 1 answers
  1. jayanthi
    jayanthi avatar
    111 posts
    Member since:
    Jul 2010

    Posted 10 Sep 2012 Link to this post


    Its very urgent.

    I have 2 radlistbox in radpageview.
    Definition is as below:

    <telerik:RadPageView ID="rpvAssignProcess" runat="server">
     <table cellpadding="0" cellspacing="0">
     <td>Available Process</td>
     <td>Assign Process</td>
        <telerik:RadListBox ID="rlboxAvailableProcess" runat="server" AllowTransfer="True" 
            DataSourceID="SqlDataSource_Process" DataTextField="ProcessName"   Skin="WebBlue" 
            TransferToID="rlboxAssignProcess" Height="200px" Width="300px" DataValueField="ProcessName"  
            <ButtonSettings TransferButtons="All" />
                        <span style="float:left;padding:10px">
                            <%# DataBinder.Eval(Container.DataItem, "CustomerID")%>
                       <br />
                            <%# DataBinder.Eval(Container.DataItem, "ProcessName")%>
                <ODataSettings InitialContainerName="">
     <telerik:RadListBox ID="rlboxAssignProcess" runat="server" AllowDelete="false" AllowReorder="true" 
             Skin="WebBlue" Height="200px" Width="300px" DataSourceID="SqlDataSource_Process1"
             DataTextField="ProcessName" DataValueField="ProcessName">
            <ButtonSettings Position="Right" VerticalAlign="Top" />

    Code behind code:

    Protected Sub RadTabStrip1_TabClick(sender As Object, e As Telerik.Web.UI.RadTabStripEventArgs) Handles RadTabStrip1.TabClick
            If RadTabStrip1.SelectedIndex = 4 Then
                    Dim CustomerID As String = ""
                    For Each item As GridDataItem In rgView1.MasterTableView.Items
                        If item.Selected = True Then
                            If CustomerID = "" Then
                                CustomerID = item.Item("CustomerID").Text
                                CustomerID += "','" + item.Item("CustomerID").Text
                            End If
                        End If
                    SqlDataSource_Process.SelectCommand = "SELECT CustomerID,ProcessName FROM tbl_Process where CustomerID IN ('" & CustomerID & "')"
                Catch ex As Exception
                End Try
            End If
        End Sub

    It shows multicolumn in first radListbox with values CustomerId, ProcessName. Also i can transfer it to second radlistbox. I tried to transfer data from second to first radlistbox. Data is transfering but it is not visible, transfered row in first listbox is not visible properly. Why it happens? Guide me

  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Sep 2012 Link to this post

    Hi Jayanthi,

    When you transfer templated items with binding expressions, in order to have these expressions evaluated after the items are transferred, you should subscribe to the Transferred server-side event and call databind method for each of the transferred items.

    void rlboxAvailableProcess_Transferred(object sender, RadListBoxTransferredEventArgs e)
            foreach (RadListBoxItem item in e.Items)

    Please take a look into this demo and forum thread for more information.

    Hope this helps.

Back to Top