This is a migrated thread and some comments may be shown as answers.

Search on list? Autoselect?

2 Answers 91 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 1
Alexandre asked on 07 Dec 2010, 04:21 PM
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 Answers, 1 is accepted

Sort by
0
Alexandre
Top achievements
Rank 1
answered on 07 Dec 2010, 07:02 PM
Need some help please ... I really need a solution to stop this...
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 07 Dec 2010, 10:31 PM
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
Tags
MultiColumn ComboBox
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Alexandre
Top achievements
Rank 1
Richard Slade
Top achievements
Rank 2
Share this question
or