ExtensionsFactory.FilterControl<RowType>(Action<MVCxFilterControlSettings<RowType>>) Method

Creates a Filter Control.

Namespace: DevExpress.Web.Mvc.UI

Assembly: DevExpress.Web.Mvc5.v20.1.dll

Declaration

public FilterControlExtension<RowType> FilterControl<RowType>(
    Action<MVCxFilterControlSettings<RowType>> method
)
    where RowType : class
Public Function FilterControl(Of RowType As Class)(
    method As Action(Of MVCxFilterControlSettings(Of RowType))
) As FilterControlExtension(Of RowType)

Parameters

Name Type Description
method Action<MVCxFilterControlSettings<RowType>>

A delegate method that accepts MVCxFilterControlSettings<RowType> as a parameter.

Type Parameters

Name
RowType

Returns

Type Description
FilterControlExtension<RowType>

A FilterControlExtension<RowType> object implementing the Filter Control functionality.

Remarks

To enable binding the filter control to Model fields using lambdas, it is required to declare the Filter Control extension using the FilterControl<RowType> strongly-typed declaration method.

NOTE

The partial View with the Filter Control extension does not need to be strongly-typed.


Html.DevExpress().FilterControl<Product>(settings => {
    settings.Name = "filterControl";
    settings.Width = Unit.Percentage(100);
    settings.CallbackRouteValues = new { Controller = "Editors", Action = "FilterControlPartial" };
   ...
}).GetHtml();
See Also