Show custom DropDownList for Filterable mode row

1 Answer 61 Views
Filter Grid
Stefan
Top achievements
Rank 1
Iron
Iron
Iron
Stefan asked on 24 Sep 2024, 11:37 AM | edited on 24 Sep 2024, 11:41 AM

Hi support team,

 

we need filterable: { mode: "row" }  to have  a filter row.

We also need a DropDownList for a boolean column in the filter as described here:

https://docs.telerik.com/kendo-ui/knowledge-base/grid-boolean-dropdownlist-filter

 

When using this we see an ugly filter row item:

 

I expect to have the DropDownList in the filter row.

 

This worked using following MVC template  syntax in the past


   .Filterable(f => f.Multi(false).Cell(c => c.ShowOperators(false)
   .Template(@<text>
               function(args) {
               args.element.kendoDropDownList({
               autoBind: false,
               dataTextField: "text",
               dataValueField: "value" ,
               dataSource: new kendo.data.DataSource({
               data: [{ text: "Ja" , value: "true" },
               { text: "Nein" , value: "false" }]
               }),
               index: 0,
               optionLabel: {
               text: "Filter" ,
               value: ""
               },
               valuePrimitive: true
               })
               }
            </text>

 

is this a bug?

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 27 Sep 2024, 08:27 AM

Hi Stefan,

 

Thank you for contacting us.

You need to see the following result:


Here is a live url for demonstration:
https://dojo.telerik.com/IdoYorav

Is this the expected result?

 

Regards,
Eyup
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Stefan
Top achievements
Rank 1
Iron
Iron
Iron
commented on 30 Sep 2024, 11:18 AM | edited

Hi Eyup,

 

no. The expected result is to have a filter row with a drop down as shown in my screenshot.

 

 

 

in your demo, please set filterable: { "mode": "row"} and then there we see only 2 radio buttons.

https://dojo.telerik.com/IdoYorav/2

This should be a dropdownlist and no radio buttons.

 

Stefan
Top achievements
Rank 1
Iron
Iron
Iron
commented on 02 Oct 2024, 05:17 AM

@Eyup
Eyup
Telerik team
commented on 03 Oct 2024, 10:08 AM

Hi Stefan,

When you are using filter mode Row, the proper way of creating a filtering template is a bit different and you can use the following property to do that:
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.filterable.cell#columnsfilterablecelltemplate

I have modified the sample for your convenience:
https://dojo.telerik.com/JZezjaIy/4

And the dropdownlist now appears in row mode:

Do you find this example beneficial? Let me know what you think.

Stefan
Top achievements
Rank 1
Iron
Iron
Iron
commented on 21 Oct 2024, 01:40 PM | edited

I can confirm this is working.

 

However, I needed another approach to be able to save and load the column layout of my grid.

In the meantime, I was able to workaround this, as I do not save and load all columns of the grid but only a subset. And this particalur filter button must always remain visible. So this problem disappeared.

 

Eyup
Telerik team
commented on 23 Oct 2024, 02:03 PM

Hi


Tags
Filter Grid
Asked by
Stefan
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Eyup
Telerik team
Share this question
or