<div dir="ltr"><div>Can you be more explicit ? How should we overwrite the Cell Class of Horizon ?</div><div>Is there a best practice ? Or example at hand ? </div><div>Seems that is not easy for me and, it's the only choice here for that case? </div><div><br></div>Thank you very mush for your reply !<div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><i><span style="font-family:georgia,serif"><font size="2"><b>Best Regards!</b></font></span></i></div><i><span style="font-family:georgia,serif"><font size="2"><b>Chao Yan</b><br><b><span></span></b>--------------<br>About me <span>: </span><a href="http://about.me/chao_yan" target="_blank">http://about.me/chao_yan</a></font></span></i><br><i><span style="font-family:georgia,serif"><font size="2"><span><i><span style="font-family:georgia,serif"><font size="2">My twitter<span>: </span><a href="https://twitter.com/yanchao727" target="_blank">@yanchao727</a><br></font></span></i></span></font></span></i><i><span style="font-family:georgia,serif"><font size="2"><span><i><span style="font-family:georgia,serif"><font size="2"><span><i><span style="font-family:georgia,serif"><font size="2">My Weibo<span>: </span><a href="http://weibo.com/herewearenow" target="_blank">http://weibo.com/herewearenow</a><br></font></span></i></span></font></span></i></span></font></span></i><span><i><span style="font-family:georgia,serif"><font size="2">--------------</font></span></i></span><font size="4" face="comic sans ms, sans-serif"><b><i><br></i></b></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2016-04-14 17:44 GMT+08:00 Itxaka Serrano Garcia <span dir="ltr"><<a href="mailto:itxaka@redhat.com" target="_blank">itxaka@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If Im reading the correct correctly, you can provide on your Table class in the Meta, a cell_class.<br>
<br>
So you could create your custom Cell class that inherits from the normal Cell class (from horizon.tables.base import Cell), and based on the data, change the css before rendering?<span class=""><br>
<br>
<br>
<br>
<br>
On 04/14/2016 10:44 AM, 严超 wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, Everyone:<br>
     Is there a possible way to set CSS style for*each cell* in<br>
*DataTable* according to the value of the cell ? For example, if the<br>
cell value is *'available' *then the css should display a *green icon*<br>
as well, else if the cell value is *'error'* the the css should display<br>
a *red icon*.<br>
     What I found is horizon.tables*.*Columnoption:<br>
<br>
classes<<a href="http://docs.openstack.org/developer/horizon/ref/tables.html#horizon.tables.Column.classes" rel="noreferrer" target="_blank">http://docs.openstack.org/developer/horizon/ref/tables.html#horizon.tables.Column.classes</a>><span class=""><br>
<br>
         An iterable of CSS classes which should be added to this<br>
    column.                     Example: classes=('foo', 'bar').<br>
<br>
     But this sets all the column cell style.<br></span>
     Is there a possible way to set CSS style for* each cell respectively?*<span class=""><br>
     I'm very grateful for answering.<br>
<br></span>
/*Best Regards!*/<br>
/*Chao Yan*<br>
**--------------<br>
About me : <a href="http://about.me/chao_yan/" rel="noreferrer" target="_blank">http://about.me/chao_yan/</a><br>
//My twitter: @yanchao727 <<a href="https://twitter.com/yanchao727" rel="noreferrer" target="_blank">https://twitter.com/yanchao727</a>><br>
/////My Weibo: <a href="http://weibo.com/herewearenow" rel="noreferrer" target="_blank">http://weibo.com/herewearenow</a><br>
////--------------/*/<br>
/*<br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</blockquote>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div></div>