0

I am trying to hide some column as it has very long list of column so it display vertical scrollbar and it don't look nice.So is there any way to hide it on default grid load. it should be visible in columns list check boxes so whenever admin want hided column to show in grid can enable by checking that checkbox.

I have added below code but its not working.

<column name="gridcolumn1">
        <settings>
            <filter>text</filter>
            <label translate="true">Grid Column1</label>
            <controlVisibility>false</controlVisibility>
            <visible>false</visible>
        </settings>
    </column>

1 Answer 1

0

Edit your code to

<column name="gridcolumn1" sortOrder="100">
    <settings>
        <addField>true</addField>
        <filter>textRange</filter>
        <label translate="true">Grid Column1</label>
    </settings>
</column>

OR

<column name="gridcolumn1">
   <argument name="data" xsi:type="array">
       <item name="config" xsi:type="array">
           <item name="filter" xsi:type="string">textRange</item>
           <item name="label" xsi:type="string" translate="true">Grid Column1</item>
       </item>
   </argument>
</column>
2
  • Not working on ui grid. May 3, 2021 at 11:15
  • Did you uncheck Grid Column1 from the columns dropdown?
    – Mital Shah
    May 3, 2021 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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