Prompt, force focus on prompt textbox

10 posts, 0 answers
  1. Giancarlo Aguilera
    Giancarlo Aguilera avatar
    22 posts
    Member since:
    Nov 2006

    Posted 16 Sep 2008 Link to this post

    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!
  2. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 17 Sep 2008 Link to this post

    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.
  3. DevCraft banner
  4. yjh
    yjh avatar
    67 posts
    Member since:
    Aug 2007

    Posted 25 Oct 2009 Link to this post

    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.
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 28 Oct 2009 Link to this post

    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.
  6. NOC NOC
    NOC NOC avatar
    6 posts
    Member since:
    Mar 2010

    Posted 26 Nov 2010 Link to this post

    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?

  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 29 Nov 2010 Link to this post

    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
  8. NOC NOC
    NOC NOC avatar
    6 posts
    Member since:
    Mar 2010

    Posted 29 Nov 2010 Link to this post

    see Ticket 371211 for a sample solution
  9. George
    Admin
    George avatar
    1332 posts

    Posted 30 Nov 2010 Link to this post

    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
  10. Enal
    Enal avatar
    39 posts
    Member since:
    Oct 2011

    Posted 01 Feb 2012 Link to this post

    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.
  11. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 06 Feb 2012 Link to this post

    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 >>
Back to Top
DevCraft banner