Ticket Q292291
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Problem with EnterMoveNextControl and LayoutControl

EnterMoveNextControl and DateTimePropertyEditor

created 14 years ago

Hi,
I set EnterMoveNext control for a DateEdit and it does not work (the enter key shows the pop up). I have even set CloseUpKey to Empty and still the default functionality remains.
Any ideas as to why this is the case and how to change it?

Comments (2)
Dennis Garavsky (DevExpress) 14 years ago

    Hello Mark,
    Thank you for your message.
    This behavior is specific to the XtraLayout control and its focus functionality (EnableAutoTabOrder).
    Please refer to the Problem with EnterMoveNextControl and LayoutControl issue for more details.
    Thanks,
    Dennis

    MK MK
    Mark Krasnohorsky 14 years ago

      Hi Dennis,
      I added this:
                  LayoutControl layout = View.Control as LayoutControl;
                  if (layout != null)
                      layout.OptionsFocus.EnableAutoTabOrder = false;
      No change in behaviour. What am I doing wrong?

      Answers

      created 14 years ago

      Hello Mark,
      Thank you for your patience. I actually tested the EnableAutoTabOrder option with a non-XAF application and it worked beautifully for me.
      However, after testing with an XAF application, I could reproduce your problem. After looking at the source code of the DatePropertyEditor, I found the reason for this behavior:

      C#
      private void editor_KeyDown(object sender, KeyEventArgs e) { if(Control.IsPopupOpen) return; if(e.KeyCode == Keys.Enter) { e.Handled = true; Control.ShowPopup(); } } protected override object CreateControlCore() { DateTimeEdit editor = new DateTimeEdit(); editor.KeyDown += new KeyEventHandler(editor_KeyDown); return editor; }

      I am afraid that there is no easy way to bypass it, except for descending from the DatePropertyEditor editor and overriding its CreateControlCore method.
      Thanks,
      Dennis

        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.