7

I have configured UI component columns in the admin grid and it's working fine. I need to add custom columns dynamically.

For example we can add custom column in __prepareColumns function in Block layout

My question is, will add a custom column in the UI component approach

UI component XML:

<column name="custom_column" class="Simple\Test\Ui\Component\User\Column\CustomColumns">
            <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">Custom Column</item>
                    <item name="component" xsi:type="string">Simple_Test/js/grid/columns/customcolumns</item>
                </item>
            </argument>
        </column>
3
  • did you found any solution for adding dynamic columns in grid using ui component Commented Dec 7, 2019 at 5:03
  • Not yet. Tried few approach, not suitable. So used with block __prepareColumns approach
    – Venkat
    Commented Dec 10, 2019 at 6:26
  • Any solution? Thanks in advance
    – Liz Eipe C
    Commented Jan 22, 2023 at 22:42

0

Your Answer

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