Is there a way to force focus on the textbox that is displayed as a result to a call to RadWindow.Prompt? Currently it appears the user has to click the textbox in order to focus.
Also, it would be great if it were somehow possible to specify a default button that's clicked when the Enter key is pressed.
Thanks!
9 Answers, 1 is accepted
Currently, you cannot set the focus on the prompt textbox from the static call. We will improve this functionality for our next release. Moreover, we also plan to include a functionality for default button focus, so that when you hit the enter button it will automatically click the button. Thank you for your valuable feedback.
Your Telerik points have been updated as per our EAP Program.
Sincerely yours,
Hristo Borisov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
It's better if RadConfirm/RadPrompt provide functionality to set default focus button / textbox, and functionality to set button's width / height / horizontal alignment.
Regards,
Miroslav Nedyalkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
it does not seem to me that the textbox is getting the focus:
RadWindow
.Prompt(new DialogParameters()
{
Header =
"Create a new Folder",
Content =
"Please enter the name of the new Folder:",
Closed = (
object sender, WindowClosedEventArgs e) =>
{
if (true == e.DialogResult && !string.IsNullOrEmpty(e.PromptResult))
{
string folderName = e.PromptResult;
}
}
});
Any workaround?
Is it possible to active the OK button only when text has been entered?
The focus should be on the TextBox by default (if the focus is in the Silverlight plugin of course). Could you please describe in more details what do you observe and in which case. If you could open a support ticket and provide us with a sample project this would be of great help!
The behavior you need (to disable the OK while no text is entered) is not supported in the default implementation. What I would suggest you is to create a custom dialog and use it instead of using the Prompt static method.
Miroslav Nedyalkov
the Telerik team
We reproduced the issue. Thank you for reporting this bug, it helps us in improving our products. We will investigate the cause for this issue and we will fix it in one of our future releases.
Please do not hesitate to contact us if you require any further information.
Kind regards,George
the Telerik team
This should but does not focus on the text box. Is there a setting?
RadWindow.Prompt( "Enter your name:", this.OnClosed, "John Doe" );
Thanks.
This issue is already fixed. Please download the latest available assemblies and try with them - you could either test with the latest official release which is Q3 2011 SP1 or with the latest internal build which will be uploaded later today.
If you still experience the issue, please send us a sample project which we can run here locally and debug.
All the best,
Konstantina
the Telerik team