grid dialog and browser autocomplete

if i have a grid set wit editmode dialog , how can i stop the dialog fields having browser autocomplete 

4 Replies 1 reply marked as answer

RS Renjith Singh Rajendran Syncfusion Team February 24, 2021 10:25 AM UTC

Hi Kevin, 

Greetings from Syncfusion support. 

We suggest you to use Microsoft JsInterop to achieve this requirement. In the below codes, we have called a JS method in OnActionComplete event handler. We have set the autocomplete for the inputs with autocomplete as “on“ in grid edit dialog form element as “off”

 
Please refer the codes below, 

 
<GridEvents OnActionComplete="OnActionComplete" TValue="Order"></GridEvents>
 
public async Task OnActionComplete(ActionEventArgs<Order> Args) 
{ 
    if (Args.RequestType == Syncfusion.Blazor.Grids.Action.BeginEdit) 
    { 
        await Task.Delay(500); 
        await Runtime.InvokeAsync<object>("DisableAutocomplete");  
    } 
} 

[DisableAutocomplete.js] 

function DisableAutocomplete() {    var gridform = document.getElementsByClassName("e-gridform")[0];    var AutocompleteEnabledInputs = gridform.querySelectorAll('[autocomplete="on"]');    for (var i = 0; i < AutocompleteEnabledInputs.length;i++) {        AutocompleteEnabledInputs[i].autocomplete = "off";    }}

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran 



OD Olena Dontsova replied to kevin vickers March 20, 2021 01:10 PM UTC

if i have a grid set wit editmode dialog , how can i stop the dialog fields having browser autocomplete 

Hi Kevin,

Did you manage this problem? I have the same issue now and unfortunately this approach does not work well.

Thanks.


KV kevin vickers March 21, 2021 04:55 PM UTC

olena 

no i gave up and handled the dialog myself .. sorry 


Kevin





RS Renjith Singh Rajendran Syncfusion Team March 22, 2021 12:37 PM UTC

Hi Olena/Kevin, 

We have prepared a video demo showing the proper working of the suggestion from our side. Please download the video demo from the link below. In the below video first we have shown the browser suggestions get showed when the solution is not applied. And then after applying the solution the browser suggestions won’t be visible. 
 
If you are still facing difficulties, then the following details would be helpful for us to proceed further, 

  1. Share the video demo showing the replication of the problem you are facing after applying the suggestion.
  2. Share a simple issue reproducing sample for us to validate the reported problem.

The provided information will help us analyze the problem, and provide you a solution as early as possible. 

Regards, 
Renjith R 


Marked as answer
Loader.
Up arrow icon