Listbox allows duplicate values

5 posts, 1 answers
  1. Kevin
    Kevin avatar
    265 posts
    Member since:
    Jun 2011

    Posted 16 Apr 2012 Link to this post

    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 Sub

    Protected 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


  2. Kevin
    Kevin avatar
    265 posts
    Member since:
    Jun 2011

    Posted 17 Apr 2012 Link to this post

    hi,
    Anyone have any ideas on this, my project is at a dead stop becuase of this issue.  I have a service that find computer items to issue by Serial Number and it loads the first lb1, then is dragged to lb2 to issue, lb1 can also be populated by a dropdownlist with many items, and has the potential to find a serial number that was populated already.  But it can be duplicated over even though I have dupdlicates set to false.  HELP Please.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 17 Apr 2012 Link to this post

    Hi Kevin,

    This was a bug in RadListBox which has now been fixed. You can visit the following link for reference:
    http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q1-2012-sp1-version-2012-1-411.aspx 
     
    Regards,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Kevin
    Kevin avatar
    265 posts
    Member since:
    Jun 2011

    Posted 17 Apr 2012 Link to this post

    HI,
    ok i thougth I was going crazy becuase it was working with my old toolset and i upgraded and then people started to complain about it.  So I tried to install the package from the site and it errors out on me, is there andother way to do this.  I get a
    system.ComponentModel.win32exception: Access is denied at system.diagnostics.process.startwithshellExecuteEx(ProcessStartInfo startinfo)
    at
    system.diagnostics.process.srat()
    at boostrapper.bootstrapper.runfile()
    at bootstrapper.mainform.runapplication()

    this is the text of popup.

    I did this with my admin priledges and did not work, so then I logged into computer as admin and still got the same message.
  6. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 20 Apr 2012 Link to this post

    Hello Kevin,

    As far as I understand you are trying to upgrade from a certain version of our controls to the latest one. If this is the case I would suggest that you check out the following post where you can find detailed explanation on how to do that:
    http://www.telerik.com/support/kb/aspnet-ajax/general/updating-radcontrols-for-asp-net-to-another-version-or-license.aspx

    Greetings,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017