3

I want to make sorting false for donloaded column :

 <column name="downloaded" class="Tatva\Subscription\Ui\Component\Listing\Column\Downloadedrenderer">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">text</item>
            <item name="label" xsi:type="string" translate="true">Downloaded</item>
        </item>
    </argument>
</column> 

3 Answers 3

7

After Magento 2.2 you can make sorting false using below code.

<sortable>false</sortable>

Complete column tag looks like this

 <column name="store_id" class="Magento\Store\Ui\Component\Listing\Column\Store">
        <settings>
            <label translate="true">Purchase Point</label>
            <bodyTmpl>ui/grid/cells/html</bodyTmpl>
            <sortable>false</sortable>
        </settings>
    </column>
16

Try -

<item name="sortable" xsi:type="boolean">false</item>

This works with default grids

1
  • 1
    The other one is more concise with the op question, but this one works great with <column> childDefaults item Jun 21, 2022 at 19:48
0

If your are using argument use like this

<column name="uses">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Uses</item>
                    <item name="default" xsi:type="string">1</item>
                    <item name="sortable" xsi:type="boolean">false</item>
                </item>
            </argument>
        </column>

If you are using the setting

 <column name="grand_total" class="Magento\Sales\Ui\Component\Listing\Column\Price">
            <settings>
                <label translate="true">Grand Total (Purchased)</label>
                <sortable>false</sortable>
            </settings>
        </column>

Your Answer

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

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