Domanda

enter image description here

Can you please help me on that.Any solution for the above query?

È stato utile?

Soluzione

You can disable it by overriding ui_component file customer_listing.xml.

path: Vendor/Module/view/adminhtml/ui_component/customer_listing.xml

try below code.

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="customer_columns" class="Magento\Customer\Ui\Component\Listing\Columns">
        <column name="email" sortOrder="40">
            <settings>
                <editor>
                    <editorType>false</editorType>
                </editor>
            </settings>
        </column>
    </columns>
</listing>

After this clear your cache.

Altri suggerimenti

If you are asking about your own component, then you can open the grid and learn from Magento itself. Or search here, many articles are available.

Here is an example link: Set inline edit disable for certain field

In case you want to disable core module. You can follow my steps here:

I tried to overwrite via xml but it doesn't work. So If anyone has a solution using layout, kindly let me know.

My solution uses Javascript.

  1. You need to overwrite the column. Here I take email as an example. Use the code below in your own customer_listing.xml file

Just to make use of the component, here in this case: Vendor_Module/js/inline_edit


<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="customer_columns" class="Magento\Customer\Ui\Component\Listing\Columns">
        <column name="email" component="Vendor_Module/js/inline_edit" />
    </columns>
</listing>
  1. In your Vendor_Module/js/inline_edit file, paste the following content
define([
    'Magento_Ui/js/grid/columns/column'
], function (Column) {
    'use strict';

    return Column.extend({
        initialize: function () {
            this._super();
            this.editor = {};
            
            return this;
        },
    });

});
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top