I am using a WebGrid to display a List of Items, some items in the list are disabled, so I would like to make it dimmed in the grid, to do that I must set the row class to be dimmed if the item is disabled, I do not know how to set the row class according to a condition
This is my sample code
var grid = new WebGrid(Model, canPage: true, rowsPerPage: 20);
@grid.GetHtml(tableStyle: "grid",
rowStyle: "gridrow",
alternatingRowStyle: "gridrow_alternate",
mode: WebGridPagerModes.All,
numericLinksCount: 10,
columns: grid.Columns(
grid.Column("Name", "Name", item => (item.LocationData[0].Name), canSort: true, style: "width:60%"),
grid.Column("Url", "Url", canSort: true, style: "width:60%"),
grid.Column("Edit", "", @<a href='../VenHome/Edit/@item.ID' ><img src='/content/icons/edit.png'
alt='Edit' />
</a>, style: "width:150px"),
grid.Column("Delete", "", @<a href='#' id='Delete' itemId='@item.ID' title='@item.LocationData[0].Name'><img
src='/content/icons/delete.png' alt='Delete' />
</a>, style: "width:150px"),
grid.Column("Details", "", @<a href="../VenHome/Details/@item.Id" title="Details">
<img src="../../Content/Icons/Details.png" alt="Details" /></a>)
));
}