RadDropDown - Dropdown Items and Autocomplete

8 posts, 1 answers
  1. Dean
    Dean avatar
    43 posts
    Member since:
    Jun 2009

    Posted 15 Dec 2010 Link to this post

    Good Day,

    I've noticed that if you have a databound raddropdown control and have it on an Autocomplete mode of suggestappend I get the follow wierd dropdown list problem. Please see link below for screenshot.

    http://oi54.tinypic.com/5aromf.jpg

    To reproduce the same thing this is some sample code. It's just a Form with the RadDropDown Control on it. Now when the form opens with the raddropdown control on it click on the DropDown Arrow to view all the People, when the dropdown is still open type "R" and you will see the problem I'm having. Is there a way around this? Please let me know if you need any more information.

    Imports Telerik.WinControls.UI
     
    Public Class frmMain
        Inherits RadForm
     
        Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            RadDropDownList1.AutoCompleteMode = AutoCompleteMode.SuggestAppend
            RadDropDownList1.Text = String.Empty
            RadDropDownList1.DataSource = GetPeople()
            RadDropDownList1.DisplayMember = "Name"
            RadDropDownList1.ValueMember = "Name"
        End Sub
     
        Private Function GetPeople() As List(Of Person)
            Dim oPeople As New List(Of Person)
            oPeople.Add(New Person("Dean"))
            oPeople.Add(New Person("Ryan"))
            oPeople.Add(New Person("Richard"))
            oPeople.Add(New Person("Duncan"))
            oPeople.Add(New Person("Peter"))
            oPeople.Add(New Person("Tony"))
            oPeople.Add(New Person("Jaco"))
            oPeople.Add(New Person("Marc"))
            oPeople.Add(New Person("Lucy"))
            oPeople.Add(New Person("Mike"))
            Return oPeople
        End Function
    End Class
     
    Public Class Person
        Public Property Name As String
        Public Sub New(ByVal sName As String)
            Name = sName
        End Sub
    End Class
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Dec 2010 Link to this post

    Hi Dean,

    Hope you're well. I've tried this out but I was unable to replicate it.
    Here is a small Jing video of it on my Windows 7 64bit machine running the latest 2010 Q3 version
    Link to video

    Am I right in remembering that you're not currently on the latest version?
    Hope this helps, but let me know if you need more information
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Dec 2010 Link to this post

    Dean,

    My apologies, I didn't read your post well enough. I can replicate it if I first open the drop down list. I will look for a workaround for you and let you know as soon as possible.
    Richard
  5. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Dec 2010 Link to this post

    Hi again,

    ok, this seems to be a simple enough one. Please could you try the following. This seems to work for me unless I've missed something obvious.

    Private Sub RadDropDownList1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadDropDownList1.TextChanged
        If Me.RadDropDownList1.DropDownListElement.IsPopupOpen Then
            Me.RadDropDownList1.DropDownListElement.ClosePopup()
        End If
    End Sub

    All the best
    Richard
  6. Dean
    Dean avatar
    43 posts
    Member since:
    Jun 2009

    Posted 16 Dec 2010 Link to this post

    Thank you very much for the workaround Richard, do you think that this should be reported as a bug to the telerik team for the next upcoming Service Pack?
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 16 Dec 2010 Link to this post

    Hi Dean,

    Yes, I think this should be reported, though Telerik do review all forum posts within 72 hours and the SP1 for Q3 2010 came out yesterday. I've just tested it with that and the issue still exists.
    Glad I could help
    Richard
  8. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 16 Dec 2010 Link to this post

    Hello,

    Thank you for writing.

    Actually, you have seen the AutoSuggest DropDown Popup. It is normal to see both popups and this behavior is by design. We are following the behavior of the standard Microsoft ComboBox. You could apply the solution provided by Richard or you can turn off the AutoSuggest Mode.

    I hope this helps.

    Kind regards,
    Peter
    the Telerik team
    Check out the Q1 2011 Roadmap for Telerik Controls for Windows Forms.
  9. Dean
    Dean avatar
    43 posts
    Member since:
    Jun 2009

    Posted 17 Dec 2010 Link to this post

    Hi,

    Thank you for clarifying that this is by design. I will follow Richards recommendations for a solution.

    Kind Regards
Back to Top
UI for WinForms is Visual Studio 2017 Ready