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?

7
  • custom grid using UI component? Commented Nov 13, 2018 at 7:02
  • yes, it is custom grid using UI components. Commented Nov 13, 2018 at 7:09
  • Have you try with this <item name="componentDisabled" xsi:type="boolean">true</item> Commented Nov 13, 2018 at 7:13
  • Where should I use above code? Commented Nov 13, 2018 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. :) Commented Nov 13, 2018 at 7:42

2 Answers 2

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!

1
  • 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. Commented Nov 13, 2018 at 13:54
0

Same problem here. My solution is maintaining action column with a "small" label like "_":

<actionsColumn name="actions">
  <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">_</item>
      <item name="indexField" xsi:type="string">id</item>
      <item name="sortOrder" xsi:type="number">200</item>
    </item>
  </argument>
</actionsColumn>

It's not the best, but could not make it work without actionsColumn.

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.