RadWindow Default Button

2 posts, 0 answers
  1. BrianS
    BrianS avatar
    25 posts
    Member since:
    Sep 2006

    Posted 10 May 2011 Link to this post

    My user control is displayed in a radwindow declared in page1. The web user control contains an asp:panel with it's defaultbutton set to a button on the web user control. Page1 also has a submit button.

    If the radwindow content is focused, and I press enter, the button in the web user control works as expected.

    If i click the radwindow's title bar or icon, the button in page1 is invoked; this is not desired.

    As long as the window is displayed, only the web user control button should work.

    <telerik:RadWindow ID="radWinAccountSearch" runat="server" Title="Account Search" Behaviors="Move, Reload" VisibleStatusbar="false" >
            <ucAccountSearch:AccountSearch ID="AccountSearchControl" runat="server" OnAccountsSelected="AccountSearchControl_AccountsSelected" />
  2. Marin Bratanov
    Marin Bratanov avatar
    5016 posts

    Posted 13 May 2011 Link to this post

    Hello Brian,

    I am not sure what your exact setup is, but please note that the RadWindow is a part of the main page and thus if the form has a default button set it will take precedence when the titlebar is focued (and not the panel inside).

    What I can suggest is that when the RadWindow is shown you make the default button from the main form disabled and focus the input in the user control so that pressing enter will trigger the default button from the panel. To emphasize the effect that only the RadWindow should be active you may also set its Modal property to true. For your convenience I created and attached a simple page illustrating the approach.

    On a side note - can you reproduce this behavior when the asp panel is placed directly in the main form and not inside the RadWindow? On my end the behavior did not change and the ASP.NET's default button behavior remained the same in both cases. If the issue is reproducible this way then you will need to review your page settings since the problem does not originate in the RadWindow and is a general task.

    Kind regards,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top