KB Article A1490
Visible to All Users

How to automatically open the popup window of a dropdown in-place editor

Description:
What is the best way to automatically show the popup window of a drop down editor within an EditorContainer?

Answer:
Updated
You can handle the ~ShownEditor event (e.g. TreeList.ShownEditor, GridView.ShownEditor, VGridControl.ShownEditor etc.) and invoke the ShowPopup method of the ~ActiveEditor (e.g. **GridView.ActiveEditorTreeList.ActiveEditorVGridControl.ActiveEditor**etc.)  object. Below is code snippet which demonstrates how this event can be handled in general:

C#
void ShownEditor(object sender, EventArgs e) { GridView view = sender as GridView; view.GridControl.BeginInvoke(new MethodInvoker(() =>{ PopupBaseEdit edit = view.ActiveEditor as PopupBaseEdit; if (edit == null) return; edit.ShowPopup(); })); }
Visual Basic
Private Sub ShownEditor(ByVal sender As Object, ByVal e As EventArgs) Dim view As GridView = TryCast(sender, GridView) view.GridControl.BeginInvoke(New MethodInvoker(Sub() Dim edit As PopupBaseEdit = TryCast(view.ActiveEditor, PopupBaseEdit) If edit Is Nothing Then Return End If edit.ShowPopup() End Sub)) End Sub
Show previous comments (1)
DevExpress Support Team 12 years ago

    Hi Jim,
    Thank you for sharing your idea. Your point will be useful for other users. Thank you for your input regarding our products.

      Hello, why it's necesary to Throw New DevExpress.Utils.HideException()?

      Sasha (DevExpress Support) 10 years ago

        Hello Laura,
        This exception is internally handled by Grid in order to set MouseCaptureOwner to null. However, it's not necessary to throw a HideException exception for this task.
        Should you have further questions, let me know.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.