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
0
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
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
0
Accepted
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
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.