New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Kendo UI Filter component

Definition

Constructors

Initializes a new instance of the class.

C#
public Filter(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

Properties

If set to true the filter will display a button which when clicked will apply filtering over the datasource.

C#
public bool? ApplyButton { get; set; }

The data source to which the widget will apply a filter. Should be an existing kendo.data.DataSource instance.

C#
public string DataSource { get; set; }

An object which represents a filter expression which the kendo.data.DataSource can use to filter the data.

C#
public CompositeFilterDescriptor Expression { get; set; }

If set to true the filter will visualize the filter expression that will be applied to the datasource.

C#
public bool? ExpressionPreview { get; set; }

The configuration of the filter fields. An array of JavaScript objects that hold information regarding the filter field, it's editor, default values used for filter and etc.

C#
public List<FilterField<T>> Fields { get; set; }

Defines the value of the logical operator at the root level of the filter expression.

C#
public FilterCompositionLogicalOperator? MainLogic { get; set; }

The text messages displayed in the filter. Use it to customize or localize the filter messages.

C#
public FilterMessagesSettings Messages { get; set; }

The text of the filter operators displayed in the filter.

C#
public FilterOperatorsSettings Operators { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The HtmlTextWriter.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)