This is a migrated thread and some comments may be shown as answers.

RadTextBoxControl Click Event Prevents ClearButton

4 Answers 216 Views
TextBoxControl
This is a migrated thread and some comments may be shown as answers.
Ioannis
Top achievements
Rank 2
Ioannis asked on 26 Dec 2018, 02:26 PM

     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.

4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 Dec 2018, 11:55 AM
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.
0
Ioannis
Top achievements
Rank 2
answered on 27 Dec 2018, 12:23 PM

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)
0
Ioannis
Top achievements
Rank 2
answered on 27 Dec 2018, 12:23 PM
(forgot to attach 2.png and 3.png)
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 Dec 2018, 01:26 PM
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.
Tags
TextBoxControl
Asked by
Ioannis
Top achievements
Rank 2
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Ioannis
Top achievements
Rank 2
Share this question
or