The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientDropDownEdit.DropDownCommandButtonClick Event

Allows you to handle a click on 'Ok' and 'Cancel' buttons in the drop-down window.

Declaration

DropDownCommandButtonClick: ASPxClientEvent<ASPxClientDropDownCommandEventHandler<ASPxClientDropDownEdit>>

Event Data

The DropDownCommandButtonClick event handler receives an argument of the ASPxClientDropDownCommandEventArgs type. The following properties provide information specific to this event.

Property Description
cancel Gets or sets a value indicating whether the action which raised the event should be canceled.
(Inherited from ASPxClientCancelEventArgs)
commandName Gets the name of the processed command in the ASPxClientDropDownEdit.DropDownCommandButtonClick event.

Remarks

The DropDownCommandButtonClick event fires after the drop-down window's 'Ok' or 'Cancel' buttons have been clicked.

The following example illustrates how to use the DropDownCommandButtonClick event.

WebForms:


<dx:ASPxDropDownEdit ClientInstanceName="ddeExtraServices" ID="ddeExtraServices" runat="server" AutoPostBack="false">
    <DropDownApplyButton Visibility="Always"></DropDownApplyButton>
    <DropDownCloseButton Visibility="Always"></DropDownCloseButton>
    <ClientSideEvents TextChanged="synchronizeListBoxValues" DropDown="OnDropDown" DropDownCommandButtonClick="OnDropDownCommandButtonClick" />
</dx:ASPxDropDownEdit>

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";
    });
});

Online Demos

See Also