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 Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

142997 Feb 28,2019 05:52 AM UTC Mar 1,2019 07:21 AM UTC PHP 4
loading
Tags: Grid
Debleena Guha
Asked On February 28, 2019 06:02 AM UTC

Hi,

I have a ejgrid column field named "user".But it has set default value from browser in username field as well as password.

How to remove autofill value from the input field?

In html input field we set autocomplete="off" to remove autofill value. But i can not remove autofill value from ejgrid column field.How can i do that?

Thanks in advance.

Vignesh Natarajan [Syncfusion]
Replied On February 28, 2019 06:40 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 


Debleena Guha
Replied On February 28, 2019 09:06 AM UTC

It is not working yet. It holds the cache browser login credential value as username in the input field.

Please see the attched file image.

Thanks in advance.

Attachment: grid_f5367664.rar

Debleena Guha
Replied On February 28, 2019 09:27 AM UTC

I want to prevent browser from caching form field in ejgrid. Is this possible?

Vignesh Natarajan [Syncfusion]
Replied On March 1, 2019 07:21 AM UTC

Hi Debleena, 
 
Thanks for the update. 
 
Query: “It is not working yet. It holds the cache browser login credential value as username in the input field” 
 
We have analyzed the shared screenshot and found that you are using dialog / dialogTemplate editMode. We are able to reproduce the reported issue while preparing sample as per your screenshot. This is because previously we have provided the solution for inlinemode edit form and individual elements. But in you sample you have used dialog editing. So reported issue is not resolved. 
 
Kindly refer the below code example to disable autocomplete for element inside the dialog. 
 
function complete(args) {            
          if(args.requestType == "beginedit" || args.requestType == "add"){ 
            // to hide autoComplete for specific column input box  
                        var id = this.element.attr("id");  
                        //Grid ID + ColumnName  
                        //we have removed the autocomplete for CustomerID column  
                        $("#" + id + "CustomerID").attr("autocomplete", "off");  
                        // if you are using dialog template kindly use the elment id to diable the autocomplete 
          } 
        } 
 
   
 
If you still facing issue, kindly share the following details which will be helpful for us to validate the reported issue at our end 
 
  1. Share the Grid rendering code
  2. Share the screenshot of script error in console window (if).
  3. Share the video demonstration of reported issue.
  4. If possible share the issue reproducible sample.
 
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

;