J
James Radke
Hello,
If I have a repeater with an ItemTemplate like:
<ItemTemplate>
<tr valign="Top" class="normal">
<td width="70px" align="center" valign="middle">
<asp:TextBox ID="txtEstDate1" runat="server" Text='<%#
format(DataBinder.Eval(Container, "DataItem.EstProduction"), "MM/dd/yy") %>'
CssClass="ReportDataSmall" Width="60px" MaxLength="8">
</asp:TextBox>
</td>
<td valign="middle" width="70px"><%#
Format(DataBinder.Eval(Container.DataItem, "DueDate"),"MM/dd/yy") %></td>
<td align="center" valign="middle" width="200px"><%#
DataBinder.Eval(Container.DataItem, "Name") %></td>
<td align="center" valign="middle" width="180px"><%#
DataBinder.Eval(Container.DataItem, "Grade") %></td>
<td align="center" valign="middle" width="110px"><%#
DataBinder.Eval(Container.DataItem, "Color") %></td>
<td align="center" valign="middle" width="110px"><%#
DataBinder.Eval(Container.DataItem, "Pattern") %></td>
<td align="center" valign="middle" width="80px"><%#
DataBinder.Eval(Container.DataItem, "SlitWidth") %></td>
<td align="center" valign="middle" width="120px"><%#
DataBinder.Eval(Container.DataItem, "OrderNum") & "-" &
DataBinder.Eval(Container.DataItem, "Line") & "-" &
DataBinder.Eval(Container.DataItem, "Delivery") %></td>
<td align="center" valign="middle" width="85px"><%#
DataBinder.Eval(Container.DataItem, "quantity") %></td>
</tr>
</ItemTemplate>
And I have another value field in the datatable called "Scheduled" (boolean
field), is there a way for me, in the OnItemDataBound procedure to compare
the value of "Scheduled" and if true then set the items TR class to
something else which would set the background color of the entire row (ie
"backgroundhighlighted")?
Or, is there some other way that I can set the background color of the row
based on the value of an item in the data?
Any examples / pointers would be wonderful!
Thanks!
Jim
If I have a repeater with an ItemTemplate like:
<ItemTemplate>
<tr valign="Top" class="normal">
<td width="70px" align="center" valign="middle">
<asp:TextBox ID="txtEstDate1" runat="server" Text='<%#
format(DataBinder.Eval(Container, "DataItem.EstProduction"), "MM/dd/yy") %>'
CssClass="ReportDataSmall" Width="60px" MaxLength="8">
</asp:TextBox>
</td>
<td valign="middle" width="70px"><%#
Format(DataBinder.Eval(Container.DataItem, "DueDate"),"MM/dd/yy") %></td>
<td align="center" valign="middle" width="200px"><%#
DataBinder.Eval(Container.DataItem, "Name") %></td>
<td align="center" valign="middle" width="180px"><%#
DataBinder.Eval(Container.DataItem, "Grade") %></td>
<td align="center" valign="middle" width="110px"><%#
DataBinder.Eval(Container.DataItem, "Color") %></td>
<td align="center" valign="middle" width="110px"><%#
DataBinder.Eval(Container.DataItem, "Pattern") %></td>
<td align="center" valign="middle" width="80px"><%#
DataBinder.Eval(Container.DataItem, "SlitWidth") %></td>
<td align="center" valign="middle" width="120px"><%#
DataBinder.Eval(Container.DataItem, "OrderNum") & "-" &
DataBinder.Eval(Container.DataItem, "Line") & "-" &
DataBinder.Eval(Container.DataItem, "Delivery") %></td>
<td align="center" valign="middle" width="85px"><%#
DataBinder.Eval(Container.DataItem, "quantity") %></td>
</tr>
</ItemTemplate>
And I have another value field in the datatable called "Scheduled" (boolean
field), is there a way for me, in the OnItemDataBound procedure to compare
the value of "Scheduled" and if true then set the items TR class to
something else which would set the background color of the entire row (ie
"backgroundhighlighted")?
Or, is there some other way that I can set the background color of the row
based on the value of an item in the data?
Any examples / pointers would be wonderful!
Thanks!
Jim