In Development
Last Updated: 14 Mar 2024 10:15 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 25 Sep 2018 10:24
Category:
Type: Bug Report
1
FIX. RadDropDownList - when the DropDownListElement.AutoCompleteAppend.LimitToList property is enabled, Ctrl+V is not properly processed
To reproduce:
            this.radDropDownList1.DropDownListElement.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            this.radDropDownList1.DropDownListElement.AutoCompleteAppend.LimitToList = true;
            this.radDropDownList1.DataSource = new List<string>() { "Test1", "Test2" };

Copy "Test2" and right click over the textbox. The second item is selected. However, if you press Ctrl+V instead of using the Paste option in the context menu, nothing happens.

Workaround:

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        RadDropDownList1.DropDownListElement.AutoCompleteMode = AutoCompleteMode.SuggestAppend
        RadDropDownList1.DropDownListElement.AutoCompleteAppend.LimitToList = True
        RadDropDownList1.DataSource = {"Test1", "Test2"}
        
        Me.RadDropDownList1.DropDownListElement.AutoCompleteAppend = New CustomAutoCompleteAppendHelper(Me.RadDropDownList1.DropDownListElement)
    End Sub 

    Public Class CustomAutoCompleteAppendHelper
    Inherits AutoCompleteAppendHelper
        Public Sub New(owner As RadDropDownListElement)
            MyBase.New(owner)

        End Sub

        Public Overrides Sub AutoComplete(e As KeyPressEventArgs)
            If Control.ModifierKeys = Keys.Control AndAlso Asc(e.KeyChar) = 22 Then
                Me.AutoComplete(e, False)
            Else
                Me.AutoComplete(e, Me.LimitToList)
            End If 
        End Sub
    End Class
0 comments