I am using the RadWindow to display dialogs in my application. Is there a way to set the default button in the dialog? If so, how?
For instance, I have an "ok" and a "cancel" button. If a user hits "enter" on their keyboard, I would automatically like to "click" the "ok" button.
Thank you,
1 Answer, 1 is accepted
0
Hristo Borisov
Telerik team
answered on 22 Feb 2010, 11:40 AM
Hello Paranoid Andriod,
Yes, you can specify the default behavior of a button in your RadWindow control. You just have to set the attached property RadWindow.ResponseButton that defines what type of action you want it to perform. The ResponseButton property has two enum values, Accept and Cancel. If the user hits the enter keyboard button, the button in your RadWindow which has ResponseButton="Accept" will be clicked. The same goes for the Cancel value, and the ESC keyboard button. We have an article explaining in details how to achieve the behavior here - Use keyboard to get user response with RadWindow .
If you have any further questions, please get back to us immediately.
All the best,
Hristo Borisov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items.