Skip to main content

ASPxClientEdit.ClearEditorsInContainer(container) Method

Assigns a null value to all editors in a specified visibility state, which are located within a specified container and belong to a specific validation group.


static ClearEditorsInContainer(
    container: any,
    validationGroup?: string,
    clearInvisibleEditors?: boolean
): void


Name Type Description
container any

An HTML element specifying the container of editors to be validated.

validationGroup string

A string value specifying the validation group’s name.

clearInvisibleEditors boolean

true to clear both visible and invisible editors that belong to the specified container and group; false to clear only visible editors.


Call this method to programmatically clear the editors while performing client-side validation, based on specified settings.


If the container parameter is set to null, the method clears all/visible editors which belong to validationGroup (similar to the ASPxClientEdit.ClearGroup method).

If the validationGroup parameter is set to null, the method clears all/visible editors located within the container.

If both the container and validationGroup parameters are set to null, the method clears all/visible editors on a page.



<dx:ASPxButton ID="clearBtn" runat="server" AutoPostBack="False" ClientInstanceName="clearBtn" Text="Clear Editors">
    <ClientSideEvents Click="function(s, e) {
    }" />


<dx:ASPxPopupControl ID="Popup" runat="server" ClientInstanceName="Popup" PopupElementID="showPopupBtn"
    CloseAction="CloseButton" PopupHorizontalAlign="WindowCenter">
    <ClientSideEvents Closing="function(s, e) {
    }" />
        <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
            <div id="PopupCollection">
                <dx:ASPxTextBox ID="txtBox3" runat="server" ClientInstanceName="txtBox3" Width="170px">
                <br />
                <dx:ASPxComboBox ID="comboBox2" runat="server" ClientInstanceName="comboBox2" DataSourceID="AccessDataSource1"
                    TextField="CompanyName" ValueField="CustomerID">
                <br />
                <dx:ASPxTextBox ID="txtBox4" runat="server" ClientInstanceName="txtBox4" Width="170px">


settings.ClientSideEvents.CloseUp = "function(s, e){ ASPxClientEdit.ClearEditorsInContainer(document.getElementById('popupForm'),'',true);}";

Online Example

How to use ASPxClientEdit methods to clear editors within a specified container

See Also