Search on list? Autoselect?

3 posts, 1 answers
  1. Alexandre
    Alexandre avatar
    26 posts
    Member since:
    Feb 2008

    Posted 07 Dec 2010 Link to this post

    Hi, there is something I don't understand about the multicolumncombobox... When i'm writing on the text field if there is something corresponding in the list that automaticly select it and fire the selectedindexchanged event. Do there is a way to prevent it?
  2. Alexandre
    Alexandre avatar
    26 posts
    Member since:
    Feb 2008

    Posted 07 Dec 2010 Link to this post

    Need some help please ... I really need a solution to stop this...
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 07 Dec 2010 Link to this post

    Hello,

    I take it that you have the DropDownStyle set to DropDown. Is that correct? Do you need to have it like that? If not, then simply setting the DropDownStyle to DropDownList will solve your issue. The code below is just a MultiColumnComboBox and a RadLabel on a form.

    Imports Telerik.WinControls.UI
    Imports System.ComponentModel
      
    Public Class Form1
      
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      
            Me.RadMultiColumnComboBox1.Text = ""
            Me.RadMultiColumnComboBox1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList
      
            Dim people As New BindingList(Of Person)()
            people.Add(New Person("Richard", 1))
            people.Add(New Person("Fred", 2))
            people.Add(New Person("Bert", 3))
            people.Add(New Person("Barry", 4))
      
            Me.RadMultiColumnComboBox1.DataSource = people
        End Sub
      
      
        Private Sub RadMultiColumnComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadMultiColumnComboBox1.SelectedIndexChanged
            Me.RadLabelSelection.Text = "Selection Made: " & Me.RadMultiColumnComboBox1.SelectedIndex.ToString()
        End Sub
      
    End Class
      
    Public Class Person
      
        Public Sub New(ByVal name As String, ByVal id As Integer)
            Me.Name = name
            Me.Id = id
        End Sub
      
        Public Property Name As String
      
        Public Property Id As Integer
    End Class

    Let me know if that's what you mean, or if tyou need more information.
    Thanks
    Richard
Back to Top