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

Prompt, force focus on prompt textbox

9 Answers 187 Views
Window
This is a migrated thread and some comments may be shown as answers.
Giancarlo Aguilera
Top achievements
Rank 1
Giancarlo Aguilera asked on 16 Sep 2008, 06:05 PM
Hello Telerik!

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

Sort by
0
Hristo Borisov
Telerik team
answered on 17 Sep 2008, 09:22 AM
Hello Giancarlo Aguilera,

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.
0
yjh
Top achievements
Rank 1
answered on 25 Oct 2009, 01:25 PM
One year has past, but I can't see any functionality for default button focus.

It's better if RadConfirm/RadPrompt provide functionality to set default focus button / textbox, and functionality to set button's width / height / horizontal alignment.
0
Miroslav Nedyalkov
Telerik team
answered on 28 Oct 2009, 11:44 AM
Hello Yoa,

The default focused element of the RadPrompt is the TextBox and the default focused button of the RadConfirm is the Ok button. The Ok button is clicked of Enter key is hit and the Cancel button is clicked when the Esc key is hit. This behavior is by design.

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.
0
NOC NOC
Top achievements
Rank 1
answered on 26 Nov 2010, 08:14 PM
Hi Miroslav,

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?

0
Miroslav Nedyalkov
Telerik team
answered on 29 Nov 2010, 10:03 AM
Hello,

 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.

Kind regards,
Miroslav Nedyalkov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
NOC NOC
Top achievements
Rank 1
answered on 29 Nov 2010, 01:40 PM
see Ticket 371211 for a sample solution
0
George
Telerik team
answered on 30 Nov 2010, 08:54 AM
Hello,

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
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Enal
Top achievements
Rank 1
answered on 01 Feb 2012, 02:25 PM
Hello, I was just going to report this but noticed someone did so years ago.
This should but does not focus on the text box. Is there a setting?

 RadWindow.Prompt( "Enter your name:", this.OnClosed, "John Doe" );

Thanks.
0
Konstantina
Telerik team
answered on 06 Feb 2012, 10:33 AM
Hi all,

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
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Window
Asked by
Giancarlo Aguilera
Top achievements
Rank 1
Answers by
Hristo Borisov
Telerik team
yjh
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
NOC NOC
Top achievements
Rank 1
George
Telerik team
Enal
Top achievements
Rank 1
Konstantina
Telerik team
Share this question
or