Tab

ASPxPanelBase.DefaultButton Property

Gets or sets the identifier for the default button that is contained in the panel control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

[DefaultValue("")]
public string DefaultButton { get; set; }

Property Value

Type Default Description
String

String.Empty

A string value corresponding to the ID for a button control contained in the panel.

Remarks

Use the DefaultButton property to indicate which button is clicked when the panel control has focus and the user presses the ENTER key.

NOTE

The DefaultButton property works when it is possible to focus a panel. To be able to focus the panel, assign the TabIndex property for the panel.

Example

The complete sample project is available in the DevExpress Code Central database at E347.

<dxp:ASPxPanel ID="ASPxPanel1" runat="server" DefaultButton="ASPxButton1" Width="200px">
    <PanelCollection>
        <dxp:PanelContent runat="server">
            <dxe:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px" 
                Text="test value" ClientInstanceName="ASPxTextBox1" />
                <br/>
                <dxe:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" 
                    Text="Return To Parent Page">
                <ClientSideEvents Click="ReturnToParentPage" />
            </dxe:ASPxButton>
        </dxp:PanelContent>
    </PanelCollection>
</dxp:ASPxPanel>
See Also