Completed
Last Updated: 24 Jul 2014 06:30 by ADMIN
ADMIN
Anton
Created on: 04 Jul 2013 07:11
Category: Editors
Type: Bug Report
1
FIX. RadMaskEditBox - Wrong cursor placement after typing decimal separator (it goes to the last position).
RadMaskEditBox - Wrong cursor placement after typing decimal separator (it goes to the last position) when you change Decimal symbols for Currency as ";"

Workaround:
            this.radMaskedEditBox2.KeyPress += new KeyPressEventHandler(radMaskedEditBox2_KeyPress);
            this.radMaskedEditBox2.KeyUp += new KeyEventHandler(radMaskedEditBox2_KeyUp);
        }

        void radMaskedEditBox2_KeyPress(object sender, KeyPressEventArgs e)
        {
            string separtor = Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencyDecimalSeparator;

            if (e.KeyChar.ToString() == separtor)
            {
                e.Handled = true;
            }
        }

        void radMaskedEditBox2_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyValue == 186)
            {
                RadMaskedEditBoxElement radMaskedEditBoxElement = sender as RadMaskedEditBoxElement;
                int index = radMaskedEditBoxElement.TextBoxItem.Text.IndexOf(';');
                radMaskedEditBoxElement.TextBoxItem.SelectionStart = index + 1;
            }
        }
0 comments