0

I have built a custom grid where I have only 3 columns, i.e. Category and Priority, and the Mass Action column.

Since the priority field is the only field which can be changed, so I don't want Edit action in the grid.

Now the problem is that if the Actions column is not present in the grid, the field "All in Column" does not work in the mass edit action.

All in Column Image

This functionality does not work, because the Apply button becomes hidden if the Actions column is not visible in the grid.

Is there any way to make it work?

  • custom grid using UI component? – Chirag Patel Nov 13 '18 at 7:02
  • yes, it is custom grid using UI components. – Mohit Kumar Arora Nov 13 '18 at 7:09
  • Have you try with this <item name="componentDisabled" xsi:type="boolean">true</item> – Chirag Patel Nov 13 '18 at 7:13
  • Where should I use above code? – Mohit Kumar Arora Nov 13 '18 at 7:16
  • @ChiragPatel, I tried to use your code in the Actions column, but it did not work. using componentDisabled hides the column and due to this, I am at the same place where I started my question. :) – Mohit Kumar Arora Nov 13 '18 at 7:42
0

Try with below code. i used in my custom module. and it's working.

<actionsColumn name="actions" class="Namespace\Modulename\Ui\Component\Listing\Column\ImageActions">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="indexField" xsi:type="string">image_id</item>
                <item name="urlEntityParamName" xsi:type="string">image_id</item>
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </actionsColumn>

Before add code column is showing.

enter image description here

After add code column is hide.

enter image description here

I hope it helps!

  • My problem is not hiding or showing the column. My problem is that when I hide the Actions column, the mass action field All in column does not work. This is because the Apply button also hides when we hide/remove the Actions column from the grid. – Mohit Kumar Arora Nov 13 '18 at 13:54

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.