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

How to make a row filter at top filters for dropdown value in kendo grid?

2 Answers 737 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Isha
Top achievements
Rank 1
Isha asked on 08 Aug 2018, 12:43 PM

How can I make a filter "row" filters dropdown column text in kendo grid. For now, ]when I click on dropdown filter , its showing [Object] [object].

 

Please suggest how can I filter text from dropdown value in filterable mode row?

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetina
Telerik team
answered on 13 Aug 2018, 09:58 AM
Hello Isha,

Could you explain a bit more what you mean by a dropdown column in the Grid? If you are using a ForeignKey column like the Category column in the Grid / ForeignKey column demo, enabling the row filtering mode should produce a correctly working DropDownList filter.

If you are using a template for the filter cell, you might need to set valuePrimitive: true to the DropDownList used in the template in order to get it working correctly:
columns.Bound(p => p.ShipName).Width(500).Filterable(filter => filter.Cell(cell => cell.Template("dropDownFilter")));

<script>
 
    function dropDownFilter(e) {
        e.element.kendoDropDownList({
            dataSource: e.dataSource,
            dataTextField: "ShipName",
            dataValueField: "ShipName",
            valuePrimitive: true
        });
        }
</script>

However, at this point, this is just a guess, as I do not know how you set up the Grid and column filter.
If the problem persists, please, show us your current Grid declaration.

Regards,
Tsvetina
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Isha
Top achievements
Rank 1
answered on 02 Sep 2018, 04:35 AM
Thanks
Tags
Grid
Asked by
Isha
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Isha
Top achievements
Rank 1
Share this question
or