Completed
Last Updated: 07 Oct 2014 12:54 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 18 Aug 2014 06:32
Category: MultiColumnCombo
Type: Bug Report
0
FIX. RadMultiColumnComboBox - DropDown is closed when clicking the SearchRow inside the grid
To reproduce:
1.Add a RadMultiColumnComboBox and populate it with data.
2.Set the EditorControl.AllowSearchRow and the AutoSizeDropDownToBestFit properties to true .
3.When you open the drop down and try to use the search row (e.g. clicking over the arrow buttons), the drop down is closed.

Workaround:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.ProductsTableAdapter.Fill(Me.NwindDataSet.Products)
    Me.RadMultiColumnComboBox1.DataSource = Me.ProductsBindingSource

    Me.RadMultiColumnComboBox1.EditorControl.AllowSearchRow = True
    Me.RadMultiColumnComboBox1.AutoSizeDropDownToBestFit = True


    AddHandler Me.RadMultiColumnComboBox1.DropDownClosing, AddressOf RadMultiColumnComboBox1_DropDownClosing
    AddHandler Me.RadMultiColumnComboBox1.EditorControl.MouseDown, AddressOf EditorControl_MouseDown
End Sub

Private Sub RadMultiColumnComboBox1_DropDownClosing(sender As Object, args As Telerik.WinControls.UI.RadPopupClosingEventArgs)
    args.Cancel = shouldCancel
    shouldCancel = False
End Sub

Dim shouldCancel As Boolean = False
Private Sub EditorControl_MouseDown(sender As Object, e As MouseEventArgs)
    Dim searchElement = Me.RadMultiColumnComboBox1.EditorControl.ElementTree.GetElementAtPoint(e.Location)
    If searchElement IsNot Nothing Then
        Dim parent = searchElement.Parent
        If parent IsNot Nothing AndAlso (TypeOf parent Is GridSearchRowElement Or TypeOf parent Is GridSearchCellElement) Then
            shouldCancel = True
        End If

    End If
End Sub
0 comments