2

I need to add some css rules to one of the columns of my custom admin ui grid. Is there a way to add css class to it from listing xml file?

6

Sure, just add "fieldClass" property to the column configuration:

<column name="column_name">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="fieldClass" xsi:type="string">your-css-rule(s)</item>
        </item>
    </argument>
</column>
  • How about if you want a dynamic class based on the value or just the value of the column? – harri May 21 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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