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

Custom Editor

The Filter provides the possibility to use custom editors for scenarios requiring the use of specific editor for certain types of data.

Implementing Custom Editors

To implement a custom editor you need to specify the .EditorTemplateHandler(), .EditorTemplateid() or .EditorTemplate() options of the Filter's Field configuration. The value of this field will point to the editor template that will be used by the Telerik UI for ASP.NET MVC Filter to render the editor.

The following example demonstrates how to create a custom editor using the .EditorTemplateHandler() configuration option:

        .Fields(f =>
            f.Add(p=>p.ProductName).Label("Product Name");
        function categoryDropDownEditor(container, options) {
            $('<input data-bind="value: value" name="' + options.field + '"/>')
                    dataTextField: "CategoryName",
                    dataValueField: "CategoryID",
                    dataSource: {
                        type: "odata",
                        transport: {
                            read: ""

See Also

In this article