Thank you for your question.
You can achieve this functionality by creating a message box with two buttons - Ok
- and by also setting the default button of the message box to Button2
(which will be the cancel button). If the dialog result returns OK
(this will happen if you click OK
button), then you should focus the text box, otherwise, if you press enter, since the default button is the Cancel
button, the dialog result will return Cancel
and the text box will not be focused. Please refer to a sample implementation in the attached project.
I hope you find this information helpful.
All the best,
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download
; also available is the Q2'11 Roadmap
for Telerik Windows Forms controls.