asp.net - Is there a way using javascript not C# to change the text color of a list view? -


i wondering if there way change text color of specific line in list view based value, using javascript only, no c#. want able this, if twa value less 90 text should green, else red.

here code:

 <asp:listview id="yourlistview"  runat="server" datasourceid="sqldatasource3"  enableviewstate="false"  editindex="0" selectedindex="0">                                                                                                                                                                  <itemtemplate>   plant name:  <asp:label id="plantlabel" runat="server" text='<%# eval("plant") %>' />     <br />             department #:              <asp:label id="column1label" runat="server" text='<%# eval("column1") %>' />             <br />                     department name:                  <asp:label id="grouplabel" runat="server" text='<%# eval("group") %>' />                     job code:              <asp:label id="job_codelabel" runat="server" text='<%# eval("job_code") %>' />              <br />              twa:              <asp:label id="twalabel"  runat="server" text='<%# eval("twa") %>' />              <br />           job classification:          <asp:label id="job_classificationlabel" runat="server" text='<%# eval("job_classification") %>' />              <br />              job function:              <asp:label id="job_functionlabel" runat="server" text='<%# eval("job_function") %>' /> 


thanks given

if jquery option javascript, use .each selector iterate on each twa label item, evaluate value , apply either inline style or css class based on value.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -