How to eliminate suggestion popup in grid

1 Answer 35 Views
Grid
David
Top achievements
Rank 1
Iron
Iron
Veteran
David asked on 01 Nov 2023, 03:17 PM

 

Sometimes i have unwanted suggestions in a grid on entry (like 11,122 in attached pic).

Is there a way to eliminate this?

 

 

 

1 Answer, 1 is accepted

Sort by
0
Vasko
Telerik team
answered on 06 Nov 2023, 12:11 PM

Hello David,

Generally speaking, the autocomplete of input elements can be turned off by setting the "autocomplete" attribute to "off", but there are some issues where Google Chrome would not recognize this.

I researched the internet and found that setting the "autocomplete" attribute to "one-time-code" would work in Chrome.

Here is an example JS for applying that attribute to the Input elements inside the Grid

// In case using any editing mode except EditMode="Batch""
function pageLoadHandler() {
    disableAutoComplete();
}
Sys.Application.add_load(pageLoadHandler);

// In case using EditMode="Batch"
function OnBatchEditOpened(sender, args) {
    disableAutoComplete();
}

function disableAutoComplete() {
    $('.RadGrid input[id*=_TB_], .RadGrid input[id*=_RNTB_], .RadGrid input[id*=_RDIP]').each(function () {
        $(this).attr('autocomplete', 'one-time-code');
    });
}

Here are some articles relevant to the topic: 

I hope this helps you out.

Kind regards,
Vasko
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
David
Top achievements
Rank 1
Iron
Iron
Veteran
commented on 06 Nov 2023, 12:23 PM

Hi Vasko,

It works!!!

Thank you very much

Tags
Grid
Asked by
David
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Vasko
Telerik team
Share this question
or