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

Prevent browser from auto-filling the filter

2 Answers 156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Veteran
Richard asked on 13 Aug 2019, 01:56 PM

OK, so I've been banging my head on this for a few days and I thought I was going in the right direction but maybe now.  So the problem I have is that browsers are auto-filling the filter box of the Kendo Grid with random information based on the user.  A lot of time it's an e-mail for some random reason.

So you can find threads about setting autocomplete="off" or AutoCompleteType="Disabled" for kendo objects.  So I tried this:

{
                field: "ToFromOrganizer",
                title: "From/To/Organizer",
                filterable: {
                    cell: {
                        template: function(args) {
                            args.element.kendoMaskedTextBox({
                                value: "",
                                AutoCompleteType: "Disabled"
                            });
                        },
                        operator: "contains",
                        suggestionOperator: "contains"
                    }
                }
            },

 

In an attempt to prevent the browser from filling in the field, but that doesn't work.  Anyone have an suggestions.

 

2 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
Veteran
answered on 13 Aug 2019, 04:53 PM

Tried it as an AutoComplete and no change.  I can't seem to get value to actually work.

{
                field: "ToFromOrganizer",
                title: "From/To/Organizer",
                filterable: {
                    cell: {
                        template: function(args) {
                            args.element.kendoAutoComplete({
                                dataSource: args.dataSource,
                                dataTextField: "ToFromOrganizer",
                                dataValueField: "ToFromOrganizer",
                                valuePrimitive: true,
                                value: ""
                            });
                        },
                        operator: "contains",
                        suggestionOperator: "contains"
                    }
                }
            },
Deepak
Top achievements
Rank 1
commented on 25 Jul 2021, 12:28 PM

Hi Richard, I am facing the same issue you faced , did you solve that , may I know the solution for that pls
Nikolay
Telerik team
commented on 27 Jul 2021, 09:07 AM

Hi Deepak,

As my colleague Alex mentioned, the Kendo UI Grid features an AutoComplete for its string columns out of the box when row filtering is enabled and there is no need to explicitly set it as so. Please refer to the following demo:

And here is the behavior I got which seems to be the correct one:

There is no other auto-filling rather than the items available in the column.

Please let me know if I am missing something.

regards,

Nikolay

Richard
Top achievements
Rank 1
Veteran
commented on 28 Jul 2021, 07:42 PM

So it was definitely the browse just doing an auto fill. If I excluded the website or went into In-Private mode, then I would never get the auto fill. I ended up giving up on the column-by-column filtering and instead went to a single global search field for the entire table. It looks better, users like it as it was less confusing as well.
Nikolay
Telerik team
commented on 30 Jul 2021, 08:07 AM

Hi Richard,

I am glad to hear you found an approach suitable for the project.

Please do not hesitate to contact us back if anything new arises.

regards,

Nikolay

0
Alex Hajigeorgieva
Telerik team
answered on 15 Aug 2019, 08:25 AM
Hello, Richard,

The Kendo UI Grid features an AutoComplete for its string columns out of the box so there is no need to define them.

However, I cannot reproduce the browser behaviour you describe in this demo, can you let me know which browser you are referring to? Are you able to reproduce it here?

https://demos.telerik.com/kendo-ui/grid/filter-row

Look forward to hearing back from you.

Regards,
Alex Hajigeorgieva
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.
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Veteran
Answers by
Richard
Top achievements
Rank 1
Veteran
Alex Hajigeorgieva
Telerik team
Share this question
or