Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
340
DropDownEditorButton - Call to DropDown() doesn't show drop down window
posted

Hi,

I have made a custom column that consists out of an EditorWithText editor and a DropDownEditorButton as one of its editorbuttons. When the editorbutton is clicked, an UltraGrid is opened. This is done so I can make use of the filterrow.

Everything works fine. But now I want to open the grid when the control gets into to edit mode, either by tabbing into it or by clicking it.

As you can see in the code(below) I've added a handler to the editor's AfterEnterEditMode.  In the handler, I make the call to the DropDownEditorButton's Dropdown() method. The handler I placed on the dropDownbutton's BeforeDropDown event is called, so the DropDown method did something, but after that nothing happens. No Grid, no nothing. But when I click on the dropdown button, I do see a grid.

I have seen multiple post where people have this problem and the solution there was to cast the active cell's EditorResolved of the grid to EmbeddableEditorButtonBase. Then cast the EmbeddableEditorButtonBase's editorbutton to an DropDownEditorButton and call DropDown(). But this does not work for me.

Are there any other suggestions?

Code:

        _grid = New ePosDataGrid()
        _grid.Height = 300
        _grid.HasFilterRow = True
        _grid.DisplayColumns = Me.DisplayColumns
        _grid.DataSource = Me.DataSource
        _grid.Base.DisplayLayout.Override.FilterEvaluationTrigger = FilterEvaluationTrigger.OnCellValueChange
 
        _dropDownButton = New DropDownEditorButton() With {.Control = _grid}
        _dropDownButton.Key = "CustomActivityDropDownButton"
 
        AddHandler _dropDownButton.AfterCloseUp, AddressOf dropDownButton_AfterCloseUp
        AddHandler _dropDownButton.BeforeDropDown, AddressOf dropDownButton_BeforeDropDown
 
        Dim editor As New EditorWithText(New DefaultEditorOwner())
        AddHandler editor.AfterEnterEditMode, AddressOf editor_AfterEnterEditMode
 
        column.Editor = editor
 Private Sub editor_AfterEnterEditMode(sender As Object, e As EventArgs)
        _dropDownButton.DropDown()
    End Sub
Parents Reply Children
No Data