selectiononfocus and data entry

10 posts, 0 answers
  1. Pascal
    Pascal avatar
    11 posts
    Member since:
    Jul 2010

    Posted 17 Mar 2011 Link to this post

    For fast dataentry we have configured the control to select all text on focus
    When a user types a number (like 5) and after that tabs out or hit enter to save the data, the entered data is € 50000000.00
    When a user types a number (like 5) and after that a decimal seperator and than again a number it looks like this € 5       ,55 or with AutoFillZeros="True" € 500000000.55

    We need:
    - that everything in the control is selected on focus. (SelectionOnFocus="SelectAll")
    - when a user begins typing it starts before the decimal seperator
    - no masked sign like an underscore (Placeholder=" ")
    - no masked sign for a group seperator for input (AutoFillNumberGroupSeparators="False")
    - a masked sign for a group seperator for display

    What is possible with this controls (doesn't matter if its the Currency or Numeric)

  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 17 Mar 2011 Link to this post

    Hello Pascal,

    These requirements are supported with MaskedNumeric(Currency)Input controls. Below are the options that you can use with these controls, besides the ones that you have already used:

        - Set AllowSkipPlaceholders to false. What this property does is to disallow skipping empty positions - i.e. will prevent this behavior: € 5       ,55. This will position the caret to the left of the first digit, if none is available - to the decimal separator.
        - I am not sure I understand correctly your last requirement. If you want to have a custom group separator, then you can create a custom culture and create a NumberFormat with a new group separator.

    Please let me know if these are the things that you want to achieve and if I am missing something.

    All the best,
    Alex Fidanov
    the Telerik team
  3. DevCraft banner
  4. Pascal
    Pascal avatar
    11 posts
    Member since:
    Jul 2010

    Posted 17 Mar 2011 Link to this post

    Thank you for your answer.

    I cannot get the behavior that i want.
    The xaml below and this stepts:
    1. tab from the textbox to the numericinput -->  0,00 is selected
    2. type 5 -->  5 ,  is displayed (so the 5 is not right before the decimal seperator, there is a space between the 5 and decimal seperator)
    3. tab out and shift tab back
    4. type 6 -->  6  ,  is displayed ( so now there are 2 spaces between the 6 and decimal seperator)

    what am i doing wrong ?

     

     

     

     

     

     

    <TextBox/>
    <telerik:RadMaskedNumericInput 
        AutoFillNumberGroupSeparators="False" 
        AutoFillZeros="False" 
        AllowSkipPlaceholders="False" 
        IsClearButtonVisible="False" 
        TabNavigation="Local" 
        SpinMode="None" 
        Placeholder=" "
        SelectionOnFocus="SelectAll" 
        Culture="nl-NL" />
    <TextBox/>

  5. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 17 Mar 2011 Link to this post

    Hello Pascal,

    This seems like an issue with the selection and positioning the caret when using AllowSkipPlaceholders. When you have a selected text and you hit any key, the selected text is replaced with placeholders. However, this happens after the caret positions the caret, thus resulting in a position before clearing the text.
    I have already resolved this and it would be available with the upcoming internal builds.

    Greetings,
    Alex Fidanov
    the Telerik team
  6. Pascal
    Pascal avatar
    11 posts
    Member since:
    Jul 2010

    Posted 17 Mar 2011 Link to this post

    ok,

    Now about the thousand seperator.

    What i would like is that the thousand seperator is only visible when an amount is typed in that needs a thousand seperator.

    When i set focus on the control, this is visible -->  .   .    . 0,00 (end-users don't like this format to see)
    I would like that just this was visible --> 0,00
    and then when i type 5-> 5,00
    then 6 -> 56,00
    then 7 -> 567,00
    then 8 -> 6.678,00 (so only now, when it's needed the thousand seperator is visible)

    This is done with the following XAML. When AutoFillNumberGroupSeperator is set to false, there is never a thousand seperator visible, that's also not wat i need.

    Are there possibilities with the control for the behavior described above ?

    <telerik:RadMaskedNumericInput 
                       AutoFillNumberGroupSeparators="True" 
                       AutoFillZeros="False" 
                       AllowSkipPlaceholders="False" 
                       IsClearButtonVisible="False" 
                       TabNavigation="Local" 
                       SpinMode="None"                    
                       SelectionOnFocus="SelectAll" 
                       Culture="nl-NL" 
                       TextMode="PlainText" 
                       Placeholder=" "
                       Value="{Binding Amount, Mode=TwoWay}"
                       />
  7. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 18 Mar 2011 Link to this post

    Hi Pascal,

    This is not supported within the mask. The control will display the number in the format you describe when it is not focused, but not when you are editting the value.

    Best wishes,
    Alex Fidanov
    the Telerik team
  8. Sintayehu
    Sintayehu avatar
    67 posts
    Member since:
    Jan 2013

    Posted 04 Sep 2013 Link to this post

    Hi,

    Is there plan to make the thousand seperator act as Pascal described, make separators appear as numbers get entered?

    With an empty or " " placeholder allowing AutoFillNumberGroupSeparators makes the control look defective from the user prespective.

    ",,,,,," or " , , , , , ,"

    Thanks!
  9. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 04 Sep 2013 Link to this post

    Hi Sintayehu,

    You can try the NoMask functionality available with all RadMaskedInput controls. It is further described in the MaskedInput Common Features tutorial. Please give it a try and let us know if it helps or if you need more information.

    Regards,
    Tina Stancheva
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  10. Sintayehu
    Sintayehu avatar
    67 posts
    Member since:
    Jan 2013

    Posted 06 Sep 2013 Link to this post


    We do need the mask to limit number of characters that can be entered.
  11. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 09 Sep 2013 Link to this post

    Hi Sintayehu,

    When you use the NoMask functionality you can limit the number of digits in two ways:
    • You can use the FormatString property to apply a Standard Numeric Format Strings or a Custom Numeric Format Strings to control the input in the RadMaskedNumericInput. This means that if you need to restrict the number of digits after the decimal point to 2 in a RadMaskedNumericInput, you can set its FormatString property to "n2":

    <telerik:RadMaskedNumericInput FormatString="n2"  Mask=""/>

    • You can take advantage of the MaskedInput extensions to apply a Maximum value in the RadMaskedNumericInput. This way you can indirectly control the number of digits before the floating point. For instance, if you set a Maximum of 999, then the users will not be able to input a value greater than 999, which means that they can enter mostly 3 digits before the floating point.  And in the above sample, we can apply a Maximum of 999.99 to make sure that we can enter mostly 3-digit numbers with 2 digits after the floating point:

    <telerik:RadMaskedNumericInput FormatString="n2" Mask=""
                   maskedInput:MaskedInputExtensions.Maximum="999.99" />

    Please give this a try and let me know if it helps.

    Regards,
    Tina Stancheva
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
DevCraft banner