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

TextBox Menu Item not Validating

2 Answers 31 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Gone2TheDogs
Top achievements
Rank 1
Veteran
Gone2TheDogs asked on 24 Oct 2017, 06:57 PM

I have a textbox menu item in a submenu that isn't triggering events after the user enters a value and either clicks on the TAB or Enter key. The Validating event isn't being called. 

I have the "causesValidation" property set and AcceptsTab set to False and AcceptsReturn set to False.

How do I get the validation event to trigger when the user clicks on Tab or the Enter key from this textbox?

 

Thanks!

 

 

 

2 Answers, 1 is accepted

Sort by
0
Gone2TheDogs
Top achievements
Rank 1
Veteran
answered on 25 Oct 2017, 02:47 PM

More information. I added the textbox to a submenu using VS Designer. This is a "toolstripTextBox" and not a MenuItemTextBox.

The events for this textbox were added by Visual Studio. I added "Hello World" message to the Validating event, but it never was fired.

Any ideas on how to get this to fire? 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 Oct 2017, 06:44 AM
Hello, Bob,

Thank you for writing.  

According to the provided information, I am not sure how exactly you set up your application. That is why I have prepared a sample project following the demonstrated approach in the following help article: https://docs.telerik.com/devtools/winforms/menus/menu/working-with-radmenu-items/nesting-controls-in-menu-items

Indeed, the Validating event is not fired for the hosted textbox. I have logged this for further investigation because RadMenu is a non-selectable control and hosting focusable elements is a very specific case. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

Currently, I can suggest you using the LostFocus event which seems to be fired on my end when another control is focused. There, you can simulate the validation.

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Menu
Asked by
Gone2TheDogs
Top achievements
Rank 1
Veteran
Answers by
Gone2TheDogs
Top achievements
Rank 1
Veteran
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or