We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Ejgrid Column Field autofill Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

143000 Feb 28,2019 06:11 AM UTC Feb 28,2019 06:38 AM UTC JavaScript 1
loading
Tags: ejmGrid
Debleena Guha
Asked On February 28, 2019 06:11 AM UTC

I have two fields "user" and "password" in ejgrid. But the fields has set default browser cache value.

In html input text we set to autocomplte="off" to remove that autofill value. But i can not remove that autofill value from ejgrid column field.

How can i do that?

Thanks in advance.

Vignesh Natarajan [Syncfusion]
Replied On February 28, 2019 06:38 AM UTC

Hi Debleena, 
 
Thanks for contacting Syncfusion support.  
 
Query: “How to disable autofill default value username and password from input field in ejgrid?” 
 
From your query, we understand that you need to disable the autofill option for input text box inside the ejGrid edit form. We have achieved your requirement using actionComplete event of ejGrid. Refer the below code example 
 
<script type="text/javascript"> 
        $(function () { 
            $("#Grid").ejGrid({ 
                // the datasource "window.gridData" is referred from jsondata.min.js 
                dataSource: window.gridData, 
                allowPaging: true, 
                actionComplete: function (args) { 
                    if (args.requestType == "beginedit" || args.requestType == "add") { 
                        this.getContentTable().find(".gridform").find("input").attr("autocomplete", "off") // to hide the autoComplete for all the input elements 
 
                        // to hide autoComplete for specific column input box 
                        var id = this.element.attr("id"); 
                        //Grid ID + ColumnName 
                        $("#" + id + "CustomerID").attr("autocomplete", "off"); 
                    } 
                }, 
                editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true }, 
                toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel] }, 
                columns: [ 
…………………………………………………………………….. 
                ] 
            }); 
 
        }); 
 
    </script> 
  
For your convenience we have prepared a JS playground sample which can be referred below 
 
 
Refer our API documentation for your reference 
 
 
Please get back to us if you have further queries. 
 
Regards, 
Vignesh Natarajan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;