Can you please help me on that.Any solution for the above query?
Asked
Active
Viewed 1,210 times
2 Answers
2
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.
Rakesh Varma
- 2,226
- 10
- 18
0
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.
- You need to overwrite the column. Here I take
emailas an example. Use the code below in your owncustomer_listing.xmlfile
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>
- In your
Vendor_Module/js/inline_editfile, 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;
},
});
});
Jimmy
- 457
- 3
- 5
-
-
@RakeshVarma Thanks! Work like a charm. How did you find the
falsevalue to put there? – Jimmy Mar 18 '21 at 02:12 -
1in
Magento_Ui/js/grid/editing/record.jsfile there is a condition like thisif (_.isObject(field) && field.editorType)to create editor filed so I have passfalse– Rakesh Varma Mar 18 '21 at 04:40
