Skip to main content
Tab

ASPxDropDownEdit.DropDownApplyButton Property

Gets the settings of the Apply command button in the dropdown editor.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public virtual DropDownEditCommandButton DropDownApplyButton { get; }

Property Value

Type Description
DropDownEditCommandButton

An object that contains button properties.

Remarks

Use the DropDownApplyButton property to access the settings that define the Apply command button - a click on this button applies the selected item in the dropdown editor.

You can handle the DropDownCommandButtonClick event to process the button click.

Command Buttons

Web Forms Example

Run Demo: Modal DropDowns (Web Forms)

<dx:ASPxDropDownEdit ClientInstanceName="ddeExtraServices" ID="ddeExtraServices" 
    runat="server" AutoPostBack="false">
    <DropDownApplyButton Visibility="Always"></DropDownApplyButton>
    <DropDownCloseButton Visibility="Always"></DropDownCloseButton>
    <ClientSideEvents DropDownCommandButtonClick="OnDropDownCommandButtonClick" />
    <%-- ... --%>
</dx:ASPxDropDownEdit>
function OnDropDownCommandButtonClick(s, e){
  if (e.commandName == 'Apply')
    ddeExtraServices.HideDropDown();
  if (e.commandName == 'Close'){
    ddeExtraServices.SetText(tempText);
    ddeExtraServices.HideDropDown();
  }
}

MVC Example

Run Demo: Modal DropDowns (MVC)

...
group.Items.Add(i => {
    i.Caption="Extra Services";
    i.HelpText="Additional fee charged";
    i.NestedExtension().DropDownEdit(s => {
        s.Name = "ddeExtraServices";
        s.Properties.DropDownApplyButton.Visibility = DropDownElementVisibility.Always;
        s.Properties.DropDownCloseButton.Visibility = DropDownElementVisibility.Always;
        ...
        s.Properties.ClientSideEvents.DropDownCommandButtonClick = "onDropDownCommandButtonClick";
    });
});
function onDropDownCommandButtonClick(s, e) {
    if (e.commandName == "Apply")
        s.HideDropDown();
    if (e.commandName == "Close") {
        s.SetText(tempText);
        s.HideDropDown();
    }
}
See Also