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
410
Enter cell in edit mode selects to much
posted

Hi,

I have a UltraWinGrid that is editable. Numerical columns have a UltraNumericEditor assigned that is configured as follows:

NumericType = NumericType.Double,
PromptChar = PromtCharForNumericEditor,
CausesValidation = true,
MaskInput = "{LOC}-nnnnnnnnnnnnnnn.nn",
MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiterals

I connect the column with the editor as follows:

column.EditorComponent = this.DoubleNumericEditor;
column.UseEditorMaskSettings = true;

When I enter the cell with mouse or keyboard, the cell goes in edit mode and selects the current text in the cell. Unfortunately with the mask set, it selects all characters plus everything that might contain a character (if the entered number would be longer). A screen shot is attached.

I would like to change it, so that only the current characters are highlighted. How do I do that? (I have tried SelectAll() but this selects everything. I have seen that CurrentEditText contains a lot of spaces, and that seems to be a what is selected.)

Thanks and best regards,

Bettina


                   

  • 53790
    posted

    Hello Bettina,

    The mentioned behavior is by design and its depend of the MaskInput = "{LOC}-nnnnnnnnnnnnnnn.nn", property.

    Maybe one possible approach to achieve desired behavior could be to set:

    - ultraNumericEditor1.SelectionLength

    - ultraNumericEditor1.SelectionStart

    properties of your Editor.

    Please let me know if you have any questions.

    Regards