0

I join my custom table and add column to Product Grid as Ui_Component text. But it show data in raw code.

How to make it show as HTML code?

enter image description here

Ui_Component setting

<columns name="product_columns"> 
<column name="hub_stock" sortOrder="76">
    <settings>
        <addField>true</addField>
        <filter>text</filter>
        <label translate="true">Hub Stock</label>
    </settings>
</column>

I also add line break in database but it still show in the same row on mangeto.

1 Answer 1

2

I found the solution. https://newbedev.com/rendering-a-html-tag-in-grid-magento-2

Add this to Ui_Component column

<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>

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.