2

I have added selectionsColumn in admingrid but it appear in the right of the table. I want to move it to left of the table. how can I do that? Here is column section of my listing.xml

<!-- Column -->
  <columns name="lern_carrier_columns">
    <selectionsColumn name="ids">
      <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
          <item name="indexField" xsi:type="string">carrier_id</item>
        </item>
      </argument>
    </selectionsColumn>
    <column name="carrier_id">
      <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
          <item name="filter" xsi:type="string">textRange</item>
          <item name="sorting" xsi:type="string">asc</item>
          <item name="label" xsi:type="string" translate="true">ID</item>
        </item>
      </argument>
    </column>
    <column name="name">
      <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
          <item name="filter" xsi:type="string">text</item>
          <item name="sorting" xsi:type="string">asc</item>
          <item name="label" xsi:type="string" translate="true">Name</item>
        </item>
      </argument>
    </column>
  </columns>
5
  • Please add admin screenshot
    – Jackson
    Sep 20, 2016 at 3:48
  • postimg.org/image/6rwpbzku5 @AnkitShah
    – Seventh St
    Sep 20, 2016 at 4:04
  • @Aaron is correct just drag & drop columns & it will work :)
    – Jackson
    Sep 20, 2016 at 4:06
  • i can't drag the checkbox column @AnkitShah
    – Seventh St
    Sep 20, 2016 at 4:16
  • It's default feature. Check for other listings
    – Jackson
    Sep 20, 2016 at 4:21

4 Answers 4

13

Step-1 :- Please comment all columns except of selectionsColumn(in uicomponent) & reload your admingrid first. So You'll get only checkbox column.
Step-2 :- Now uncomment all columns & reload the page and your problem will be solved :)
If not, then pls let me know. I'll try to solve it.

0

You should be able to drag and drop the column header into the position you want.

1
  • 1
    i can't drag the checkbox column
    – Seventh St
    Sep 20, 2016 at 4:07
0

Drag and Drop the column header. I have tested and it's working. But Action column can not be dragged and dropped.

0

Please comment all columns except of selectionsColumn(in uicomponent) & reload your admingrid first. So You'll get only checkbox column. - This solution didn't work on production, bacause usually you can't comment collums on production server.

You can add draggable setting to drag and drop multiselection column

<selectionsColumn name="ids">
    <settings>
      <indexField>id</indexField>
      <draggable>true</draggable>
    </settings>
</selectionsColumn>

https://devdocs.magento.com/guides/v2.4/ui_comp_guide/components/ui-multiselectcolumn.html

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.