RadMaskedTextInput: SelectionLength always null

4 posts, 0 answers
  1. Jannk
    Jannk avatar
    23 posts
    Member since:
    Jul 2014

    Posted 18 Jul 2014 Link to this post

    I tried overriding the HandlePaste()-Method, unfortunately the SelectionStart method always give me 0.

    Anyone having the same issue?
  2. Martin
    Admin
    Martin avatar
    1099 posts

    Posted 22 Jul 2014 Link to this post

    Hello Jannk,

    The title of the forum states that the SelectionLength returns null, but the content of your reply assumes that the SelectionStart returns 0. Can you please clear which one is your issue? However, the SelectionLength property is updated before the HandlePaste() method is executed and this is why when you try to get it is incorrect. 

    Can you please tell me why you need to handle the paste of the masked input control? If it is related to a paste bug workaround you can take a look at the following bug item in our feedback portal and see if this is you case. If so, note that this big is fixed and the fix will be available in our next official release by the end of the next week. Otherwise, can you give us more information on your scenario? This way we might think of better approach to implement the desired result.

    Regards,
    Martin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Jannk
    Jannk avatar
    23 posts
    Member since:
    Jul 2014

    Posted 23 Jul 2014 in reply to Martin Link to this post

    Hey,

    I meant 0, so the topic title is wrong, it should say 0 in that title.

    The bug is related to the following item:
    http://feedback.telerik.com/Project/143/Feedback/Details/101107-pasting-in-maskedtextinput-should-work-like-in-textbox

    In the comments there's a workaround-hint. I've tried to properly implement it, unfortunately I ended up having Problems with SelectionLength / SelectionStart...

    Best regards.
  5. Martin
    Admin
    Martin avatar
    1099 posts

    Posted 28 Jul 2014 Link to this post

    Hello Jannk,

    Thank you for the clarification on the forum's title.

    As I mentioned in my last reply, currently, the SelectionLength is updated before the HandlePaste() method is executed. However, keep in mind that the linked bug logged in our feedback portal is not reproducible when you use NoMask (Mask=""). In order to resolve the paste issue you can set the Mask property of the RadMaskedTextInput to an empty string.

    <telerik:RadMaskedTextInput Mask=""/>

    If you have any particular reason to use Mask you can share it with us. This will allow us to better understand your case and assist you in the adjustment of the masked input control without using the Mask property.

    Regards,
    Martin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top