I have 2 listboxes on my page, I tried the allowduplicates = false and it still does not work. what I have is a 1st LB that takes many values and they drag and drop which ones they want to a second LB, however they can reload the 1st lb with the same Id's sometimes and tehn drag tehm over agian becuase in the db I do not failsafe that they cannot get ahold of the id until they save. I put allowSuplicates to false but it still happens, what is my way to get around this without haveing to write a bunch of codebehind to cut it out or figure out Javascript to work with it as well.
<table width="100%"> <tr> <td style="width:15%"></td> <td style="width:30%"><telerik:RadListBox ID="lbItems" runat="server" Width="300px" Height="450px" AllowTransferOnDoubleClick="true" EnableDragAndDrop="true" CssClass="aspControl" SelectionMode="Multiple" AllowTransfer="true" TransferToID="lbIssue" AllowTransferDuplicates="false" /></td> <td style="width:10%"></td> <td style="width:30%"><telerik:RadListBox ID="lbIssue" runat="server" Width="300px" Height="450px" CssClass="aspControl" AllowTransferDuplicates="false"></telerik:RadListBox></td> <td style="width:15%"></td> </tr> </table>Here are the follwoing 2 events that can load the 1st dropdownlist.
Protected Sub txtSearch_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtSearch.TextChanged Dim Id As Integer = HFSN.Value ClearLookup() lbItems.Items.Clear() sql = "Select dr.intRecId, dr.strSN + ' \ ' + dm.strMake + ' ' + m.strModel SN from Drat_Received dr INNER JOIN Drat_Model m on m.intModelId = dr.intModelId INNER JOIN Drat_Make dm on dm.intMakeId = " _ & "m.intMakeId where dr.intRecId = " & Id & " And intTransTypeID = 4 and bitTempRec IS NULL" lbItems.DataSource = getData(sql) lbItems.DataValueField = "intRecId" lbItems.DataTextField = "SN" lbItems.DataBind() End SubProtected Sub ddlModel_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlModel.SelectedIndexChanged Dim Id As Integer = ddlModel.SelectedValue ClearLookup() lbItems.Items.Clear() sql = "Select dr.intRecId, dr.strSN + ' \ ' + dm.strMake + ' ' + m.strModel SN from Drat_Received dr INNER JOIN Drat_Model m on m.intModelId = dr.intModelId INNER JOIN Drat_Make dm on dm.intMakeId = " _ & "m.intMakeId where dr.intModelId = " & Id & " And intTransTypeID = 4 and bitTempRec IS NULL Order by dr.strSN" lbItems.DataSource = getData(sql) lbItems.DataValueField = "intRecId" lbItems.DataTextField = "SN" lbItems.DataBind() End Sub