Stop Window Getting Focus

4 posts, 1 answers
  1. Jack
    Jack avatar
    127 posts
    Member since:
    May 2003

    Posted 24 Feb 2012 Link to this post

    Hi,

    This must be real easy but I can't figure it.

    I have an ascx in my MasterPage that holds some image buttons that open up a few RadWindows for help, info, that sort of thing.

    When on the registration page, if a textbox does not have a required field validator attached to it then pressing enter opens up the first RadWindow.

    I've tried changing all the properties. How to stop please?

    Cheers,

    Jon
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 28 Feb 2012 Link to this post

    Hi Jon,

    This behavior would indicate that it has AutoPostBack set to true and it performs a postback when enter is pressed within it. Another option is that there is a DefaultButton set which is triggered when there isn't validation present. Please check which of these is true and in the code-behind of which of the two conrols you are showing the RadWIndow so that you can correct this behavior (e.g. with a check for validity).

    Please also make sure you are opening the RadWindow from the server correclty and not via setting the VisibleOnPageLoad property to true, as it is prone to showing a RadWindow after a postback (which is its concept and functionality, actually).


    Regards,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jack
    Jack avatar
    127 posts
    Member since:
    May 2003

    Posted 28 Feb 2012 Link to this post

    Thank you Marin,

    My bad - i was using an ImageButton instead of an Image.

    All good now.

    Cheers,

    Jon
  5. Jack
    Jack avatar
    127 posts
    Member since:
    May 2003

    Posted 28 Feb 2012 Link to this post

    Sorry, double post!

    I was opening up the window on the client and probably wouldn't have noticed until you mentioned AutoPostBack.

    Cheers again,

    Jon
Back to Top