I have an ASP.Net MVC table that I need to highlight certain rows in it when it loads. If the type = chargeback or retroactive then I need to highlight that row. I'm not sure how to go about doing this. I guess you would do the highlighting with Javascript, but how do I check the type in the table and then highlight it?

Here's my table:

                                    <th>Order No.</th>
                                    <th>Fill Date</th>
                                    <th>Due Date</th>
                                @foreach (var linkedOrder in order.LinkedOrders)
                                            @if (@linkedOrder.Type == "Spiff")
                                                <a onclick="DisplayReceipt('@linkedOrder.OrderNo')">@linkedOrder.OrderNo</a>

                                        <td>@(linkedOrder.FillDate == null ? "--" : linkedOrder.FillDate.Value.ToShortDateString())</td>
                                        <td>@(linkedOrder.DueDate == null ? "--" : linkedOrder.DueDate.Value.ToShortDateString())</td>

Related posts

Recent Viewed