This question is locked. New answers and comments are not allowed.
Hi,
I have a problem with the grid in MVC Extension for ASP.NET (NOT the Kendo)!
the problem is that I want to color one of the rows in the grid and I didn't succeed.
here is the code:
.RowAction(row =>
{
if (row.DataItem.EventsPerSecPerCC_CCName.Equals("A44") == true)
{
row.HtmlAttributes["style"] = "background:red;";
}
}
)
I know that my problem is in the RowAction.
Please help me it is urgent for my project.
10X.
I have a problem with the grid in MVC Extension for ASP.NET (NOT the Kendo)!
the problem is that I want to color one of the rows in the grid and I didn't succeed.
here is the code:
@(Html.Telerik().Grid<CRC.Models.CRC_NetIQ_CriticalServer >()
.Name("Gridl11")
.Resizable(resizing => resizing.Columns(true))
.Columns(columns =>
{
columns.Bound(o => o.EventsPerSecPerCC_CCName).Width(100);
columns.Bound(o => o.EventsPerSecPerCC_EventsPerHour).Width(100);
columns.Bound(o => o.EventsPerSecPerCC_EventsPerMinute).Width(100);
columns.Bound(o => o.EventsPerSecPerCC_EventsPerSec).Width(100);
columns.Bound(o => o.EventsPerSecPerCC_TotalEventsPer24H).Width(100);
//.ClientTemplate("<# if( Status == 'Running') { #> <img width='16' height='16' alt='Running' src='" + Url.Content("~/Content/Images/buttonCircle_blank_green.png") + "' /> <# } else {#> <img width='16' height='16' alt='Not Running' src='" + Url.Content("~/Content/Images/buttonCircle_blank_red.png") + "' /> <# } #>").Title("Status").Width(120).HtmlAttributes(new { style = "text-align: center;" });
})
.DataBinding(dataBinding => dataBinding.Ajax().Select("_AjaxBinding" , "Home"))
.Pageable()
.Sortable()
.ClientEvents(events => events.OnRowSelected("onRowSelected" ))
.Selectable()
.Scrollable()
.Groupable()
.Filterable()
I know that my problem is in the RowAction.
Please help me it is urgent for my project.
10X.
