I just upgraded a asp.net mvc 5 project to 14.1 to find out that iggrid does not support RowTemplate
Why?
Sorry, my fault. Try now: Setting attributes to table rows with a row template not possible.
The idea is to use the igGrid.rendered or igGrid.rowsRendered events to execute some JavaScript to apply the styles to the respective table rows.
Best regards,
Martin PavlovInfragistics, Inc.
the link does not work
Hello Christian,
Try using the following approach: Setting attributes to table rows with a row template not possible.
Hope this helps,Martin PavlovInfragistics, Inc.
How do I change background color for a row
I need to change some rows to a different color
Can You help me convert this to use column template
@(Html.Infragistics().Grid<intranet.mvc5.Models.Visitor_Liste>().ID("grdDVisitor")
.PrimaryKey("ID").ShowHeader(false)
.Columns(column =>
{
column.For(x => x.ID).Width("55px").Hidden(ViewBag.KanSe == "OK" ? false : true);
column.For(x => x.ID2).Width("55px").Hidden(ViewBag.KanSe == "OK" ? false : true);
column.For(x => x.Visitor).Width("auto");
})
.Features(feature =>
feature.Paging().PageSize(6)
.ShowPagerRecordsLabel(false)
.ShowPageSizeDropDown(false)
.NextPageLabelText("")
.PrevPageLabelText("");
.AutoGenerateColumns(false)
.AutoAdjustHeight(true)
.Width("710px")
.RowTemplate("<tr><td>{{if parseInt(${ID}) > -1}}<a href='/Visitor/Ret/${ID}'><img src='/Content/images/Modify.png' /></a>{{/if}}</td><td>{{if parseInt(${ID}) > -1}}<a href='/Visitor/Slet/${ID2}'><img src='/Content/images/erase.png' /></a>{{/if}}</td><td>{{html Visitor}}</td></tr>")
.DataSourceUrl(Url.Action("Hent_Gaester"))
.DataBind()
.Render()
)