Hello,
I have three RadListBoxes on a page. First one is populated by a SQLDataSource. When an item is clicked on the first RadListBox, I want the item to add to the other two listboxes. The problem is that only one RadlistBox will populate with the selected item depending on which list box is last in the procedure.
I’m using VS 2008, and RadControls version: 2009.2.826.35
Sample ASP:
<telerik:RadListBox ID="RadListBox1" runat="server" DataSourceID="dsEDBRecords" AllowDelete="true" Style="text-align: left;" AutoPostBack="true" DataTextField="FIELDNAME" DataValueField="UVALUE" Height="150px" Width="200px" OnSelectedIndexChanged="SetValue1" SelectionMode="Single" > </telerik:RadListBox> |
<telerik:RadListBox ID="RadListBox2" runat="server" AllowDelete="false" Style="text-align: left;" AutoPostBack="true" Height="150px" Width="200px"></telerik:RadListBox> |
<telerik:RadListBox ID="RadListBox3" runat="server" AllowDelete="false" Style="text-align: left;" AutoPostBack="true" Height="150px" Width="200px" ></telerik:RadListBox> |
CODE BEHIND:
Protected Sub SetValue1(ByVal sender As Object, ByVal e As System.EventArgs) |
Dim lbListBox As RadListBox = sender |
Dim strItem As RadListBoxItem = lbListBox.SelectedItem |
Dim strItem1 As RadListBoxItem = lbListBox.SelectedItem |
RadListBox3.Items.Add(strItem) |
RadListBox3.ClearSelection() |
RadListBox2.Items.Add(strItem1) |
RadListBox2.ClearSelection() |
End Sub |
Thanks in advance for all assistance.
Doug