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
280
Last cell in a grid can be tabbed out of when invalid data is present
posted

I am using an UltraWinGrid on a form to let users change data. The last column in the grid is a string but in the grid's BeforeExitEditMode I have some code to validate the data. If it is not in the format that I expect I set e.Cancel to True. However if the user is in the last cell of the last row of the grid, enters invalid data and tabs out, the next control in the tab order is selected. It works as expected for the last cell in any other row. I have the TabNavigation property set to NextControlOnLastCell and it seems like the cancelation of the BeforeExitEditMode event is being ignored for the last cell in the grid.

Any suggestions would be appreciated.

Thank you,

Matt

Parents
No Data
Reply
  • 23930
    Offline posted

    Hi Matt,

    Thank you for posting in our forums.

    I have tried to reproduce this behavior and it seems to me that setting e.Cancel to true in the BeforeExitEdit event will prevent the cell from exiting edit mode even if the cell is the last, you use Tab key to exit the edit mode and you have set TabNavigation to NextControlOnLastCell. I have attached the sample I used to test this. Please modify it so it reproduces this behavior and I will be glad to investigate this issue further.

    I am looking forward to hearing from you.

    WG_ExitEditModeOnLastCell.zip
Children