Back to Devexpress

ASPxFilterControlBase.ApplyFilter() Method

aspnet-devexpress-dot-web-dot-aspxfiltercontrolbase-68e1cb81.md

latest2.7 KB
Original Source

ASPxFilterControlBase.ApplyFilter() Method

Applies a filter constructed by an end-user.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public virtual void ApplyFilter()
vb
Public Overridable Sub ApplyFilter

Remarks

The ASPxFilterControl is a stand-alone control that allows end-users to build filter criteria of any complexity. The current filter expression can be obtained using the ASPxFilterControlBase.FilterExpression property. After the filter expression has been constructed, you can apply it. To do this, call the ApplyFilter method. After the filter expression has been applied, you can obtain it using the ASPxFilterControlBase.AppliedFilterExpression property and apply to a source control.

javascript
<dxe:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" OnClick="ASPxButton1_Click"
    Text="ASPxButton">
    <ClientSideEvents Click="function(s, e) {
        grid.PerformCallback();
        e.processOnServer = false;
    }" />
</dxe:ASPxButton>
csharp
protected void ASPxGridView1_CustomCallback(object sender,
        DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e) {
    ASPxFilterControl1.ApplyFilter();
    ASPxGridView1.FilterExpression = ASPxFilterControl1.AppliedFilterExpression;
}

To reset the current filter expression to a previously applied filter expression, use the ASPxFilterControlBase.ResetFilter method. In this instance, the ASPxFilterControlBase.FilterExpression property is set to the ASPxFilterControlBase.AppliedFilterExpression property’s value.

See Also

FilterExpression

ResetFilter()

Filter Control

ASPxFilterControlBase Class

ASPxFilterControlBase Members

DevExpress.Web Namespace