I want to add a column in the customer grid with the name approve_account, it is not displaying in the gird. when I change the name (approve_account) to different names like approve_accounts it displays in heading with no column data. But I already created a customer attribute with name approve_account so I to add this in the customer grid. My customer_listing.xml file

<columns name="customer_columns" class="Magento\Customer\Ui\Component\Listing\Columns">
<column name="approve_account">
    <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
            <item name="dataType" xsi:type="string">select</item>
             <item name="filter" xsi:type="string">select</item>
             <item name="editor" xsi:type="string">select</item>
             <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
             <item name="label" xsi:type="string" translate="true">Is Approved</item>
             <item name="sortOrder" xsi:type="number">51</item>
             <item name="sortable" xsi:type="boolean">true</item>
             <item name="visible" xsi:type="boolean">true</item>
             <item name="componentDisabled" xsi:type="boolean">false</item>


Note : Its worked in local server. Issue in production (Both having same code)


You should provide the code of how did you create the customer attribute approve_account and which type of attribute it is.

If you want to display your attribute with values in the Customer Grid then you will have to set below given attribute option as Yes (1)

is_used_in_grid => 1

If it is set to 1 (Yes) then only, you can display the attribute column in the Customer Grid with values.

  • already assign is_used_in_grid=>1 and etc/indexer.xml also, still not displaying in customer grid. – Shekhar Suman Jul 16 '19 at 12:30
  • Is it 'Yes/No' attribute OR Dropdown? – Kartik Maniyar Jul 16 '19 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.