I am trying to color a row based on the results that returned from the datasource.
Is there a good clean way to accomplish this? The result comes back as a Hex value (not shown in the code below) so it can be a simple concatenation if needed in my MVC or Jquery. I just dont know the best way to perform this. Please help. Thanks
@(Html.Kendo().Grid<
Guardian.ViewModels.ExtendedTicketModel
>()
.Name("mytickets_grid")
.Columns(columns =>
{
columns.Bound(ticket => ticket.RequesterId);
columns.Bound(ticket => ticket.RequesterName);
columns.Bound(ticket => ticket.TopicName);
columns.Bound(ticket => ticket.Created).Format("{0:MM/dd/yyyy hh:mm tt}");
columns.Bound(ticket => ticket.Id).Title("Actions").ClientTemplate("<
button
class=\"btn btn-primary\"
onclick
=
'location.href=\"/Ticket/Details/#=Id#\"'
>Details</
button
>");
})
.DataSource(dataSource => dataSource.Ajax().Read(read => read.Action("_MyOpenTickets_Read", "Ticket", new{ username = HttpContext.Current.Items["sAMAccountName"].ToString() }))
)
.Sortable()
.Pageable()
.Filterable()
)
<
style
scoped
=
"scoped"
>
.k-detail-cell .k-tabstrip .k-content {
padding: 0.2em;
}
</
style
>