This is a migrated thread and some comments may be shown as answers.

Convert filter textbox to drop down

1 Answer 474 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yanesh
Top achievements
Rank 1
Yanesh asked on 28 Jul 2017, 04:24 AM

HI All,

        Is it possible to convert kendo UI filter textbox to dropdown and bind custom data? I need answer in server side grid. pls see attachment

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi
Telerik team
answered on 31 Jul 2017, 07:12 AM
Hello Yanesh,

The following demo illustrates how to change the filtering widget to a DropDownList:


You simply specify which function will return the desired widget:

e.g.
columns.Bound(p => p.YourColumn).Filterable(x=> x.UI("dropDownFilter"));

And the function that builds the drop down:
function dropDownFilter(element) {
        element.kendoDropDownList({
            dataSource: $('#grid').data('kendoGrid').dataSource,
            dataTextField: "YourColumn",
            dataValueField: "YourColumn",
            optionLabel: "--Select Value--"
        });
    }


Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Yanesh
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or