Ticket Q388779
Visible to All Users

ASPxGridView - How to prevent out of popup EditForm when press the "Tab" key in the last editor

created 13 years ago

I am using the AspxGridView with Enable Edit, Inserting and Delete set and use the gridview's popup edit mode set to modal. When the popup comes up I will click in the first edit field and enter it's value and then tab key through the remaining fields to enter each other fields value. Then you can tab to the Update or Cancel links to finish. The problem is you can tab past the Cancel and it starts tabbing through the browser address bar, menus, search field, browser window tab and finally back to first field in popup. Also, when the popup first come sup, no field has focus, so I tried hitting tab and the focus goes off to somewhere else in browser.
I saw you mentioned setting tabindex to - 1 for popup in this posting, http://www.devexpress.com/Support/Center/p/Q354207.aspx?searchtext=aspxgridview+modal+tab but that seems to be for a separate popup control from the grid and I have not found a setting for that yet in the gridview's properties.
I have even performed this on your Demo grid edit popup when set to modal and on your login popup for users to post questions.

Show previous comments (5)
DevExpress Support Team 13 years ago

    Hi Carl,
    Thank you for your feedback. I apologize for not being clear. To solve the problem, you need to add a standard input to the EditForm template. Handle the onfocus event. In this event, set focus to the first editor in your edit form. Please note that you need to specify ClientInstanceName to the first editor in the ASPxGridView.CellEditorInitialize event handler.
    I have created a sample project that demonstrates how you can accomplish this task. See the attachment.
    Thanks,
    Nikolai

      That's working in IE and FF, thanks.
      What is the reason a PopupEdit from a EditForm Template using the ASPxGridViewTemplateReplacement changes how the tab key functions within the popup?

      DevExpress Support Team 13 years ago

        Hi Carl,
        You are welcome.
        The last question is not quite clear to me. If you use ASPxPopupControl and place text boxes in it, you will get the same behavior as in case of the ASPxGridView popup edit form. This is standard browser behavior. When you set focus to the last element in the page hierarchy after pressing the Tab key, focus will be moved to the browser's address bar.
        Thanks,
        Nikolai

        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.