[openstack-dev] [horizon] Set CSS style for each cell in Datatable according to the value

严超 yanchao727 at gmail.com
Thu Apr 14 08:44:12 UTC 2016


Hi, Everyone:    Is there a possible way to set CSS style for* each cell*
in *DataTable* according to the value of the cell ? For example, if the
cell value is *'available' *then the css should display a *green icon* as
well, else if the cell value is *'error'* the the css should display a *red
icon*.     What I found is horizon.tables*.*Column option:    classes
<http://docs.openstack.org/developer/horizon/ref/tables.html#horizon.tables.Column.classes>

    An iterable of CSS classes which should be added to this column.
              Example: classes=('foo', 'bar').
    But this sets all the column cell style.
    Is there a possible way to set CSS style for* each cell respectively?*
    I'm very grateful for answering.

*Best Regards!*


*Chao Yan--------------About me : http://about.me/chao_yan
<http://about.me/chao_yan>*

*My twitter: @yanchao727 <https://twitter.com/yanchao727>*
*My Weibo: http://weibo.com/herewearenow <http://weibo.com/herewearenow>*
*--------------*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160414/711e37c6/attachment.html>


More information about the OpenStack-dev mailing list