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
310
UltraMaskedEdit inconsistent behavior.
posted

I'm using an UltraMaskedEdit with a mask of newmask = "444-44-AA"

When the cell is selected and the user starts typing, the cursor moves to the 8th character of the cell to accept their data entry at the appropriate location in the mask.

Unless this happens:  When the cell is selected and the user starts typing, if the user types a "4" the cursor moves to the first character of this cell. 

We want the cursor to move to the 8th character of this cell when the cell is selected and the user types a "4" or any other character. 

I am looking for a suggestion on how I can set the editor to comply with my user's requirements, or a suggestion on a work around as my client is insisting this be fixed before close of business tomorrow......

I submitted this to a request for developer help.  Here are some more details on how to reproduce.

In an UltraWinGrid, add handler for BeforeCellActivate. 

In handler for BeforeCellActivate, set the editor to an instance of UltraMaskedEdit.  Set the input mask to "444-44-AA"

Set ActiveCell.Activation = Activation.AllowEdit

Set the data of your grid cell to "444-44-11" It needs to match the beginning characters in the mask.

run your program.  Two scenarios (Scenario #2 is the desirable action for both): 

1. Activate the cell that contains value "444-44-11" for editing.  Type a "4" and the cursor will be at the first character of this cell.

2. Activate the cell that contains value "444-44-11" for editing.  Type a "9" and the cursor will be at the eighth character of this cell.  (This is what we need for both)

Thanks for your help.