RadTextBoxControl Click Event Prevents ClearButton

5 posts, 1 answers
  1. Ioannis
    Ioannis avatar
    35 posts
    Member since:
    Dec 2018

    Posted 26 Dec 2018 Link to this post

         The RadTextBoxControl has a "ShowClearButton" property where is True, at the far right end there'll be an "X" button inside the textbox to clear the text.

    If the textbox's Click event is hooked to a function and the user clicks on the "X" button, then the "X" will do nothing and the Click event is triggered.

     

    I believe that when ShowClearButton is True, that portion of the textbox which contains the "X" button should not trigger the Click or DoubleClick events of the textbox.

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3945 posts

    Posted 27 Dec 2018 Link to this post

    Hello, Ioannis, 

    The clear button is located inside the RadTextBoxControl. That is why the RadTextBoxControl.Click will be fired when you click the button. If you need to skip firing the Click event of the control, feel free to use the RadTextBoxControl.TextBoxElement.Click event instead.Thus, when you click the clear button, the custom logic in the Click event handler won't be executed.

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Ioannis
    Ioannis avatar
    35 posts
    Member since:
    Dec 2018

    Posted 27 Dec 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    I apologise in advance for this question - it's almost certainly something trivial that I just can't think of right now, but:

    • If I take your suggestion literally and add ".TextBoxElement" then I get a compilation error as shown in attached file "1.png"
    • After that, I tried to find a textbox element at part of the RadTextBoxControl's properties, but I failed to identify it (attached pictures 2.png, 3.png)
  4. Ioannis
    Ioannis avatar
    35 posts
    Member since:
    Dec 2018

    Posted 27 Dec 2018 in reply to Ioannis Link to this post

    (forgot to attach 2.png and 3.png)
  5. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3945 posts

    Posted 27 Dec 2018 Link to this post

    Hello, Ioannis, 

    I have attached a sample project for your reference demonstrating how to subscribe to the RadTextBoxControl.TextBoxElement.Click event.

    I hope this information helps. Should you have further questions please let me know.

     Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top