Just downloaded and installed latest 2014.1 Service Release (IgniteUI_20141.2249_SR)
When running my application I now get the following error when trying to open a page with the igGrid on it.
Please assist.
Hello Mark,
The RowTemplate option has been deprecated in 2014.1. To get your templating to work in this version you need to split it into column templates and add those to your columns definition.
I hope this helps! Please, let me know if you have any other questions and/or concerns!
Best regards,
Stamen Stoychev
Stamen
As I am new to Infragistics, please advise how this should be changed:-
<div> @(Html.Infragistics().Grid(Model.Rows.AsQueryable()) .ID("vmLoanList") .Width("100%") .Caption("Loan List") .AutoGenerateColumns(false) .RowTemplate("<td>${Id}</td><td class='rightAlign'>${AccountNo}</td><td>${GoodsDescription}</td>" + "<td>${AgreementType}</td><td>${Status}</td><td class='rightAlign'>${Balance}</td><td class='rightAlign'>${Arrears}</td>" + "<td class='centerAlign'>${NextInstDate}</td><td class='rightAlign'>${NextInstAmount}</td>") .Columns(columns => { columns.For(x => x.Id).DataType("string").Hidden(true); columns.For(x => x.AccountNo).DataType("int").Width("40px"); columns.For(x => x.GoodsDescription).DataType("string"); columns.For(x => x.AgreementType).DataType("string").Width("150px"); columns.For(x => x.Status).DataType("string").Width("110px"); columns.For(x => x.Balance).DataType("number").Width("110px").Format("0.00"); columns.For(x => x.Arrears).DataType("number").Width("110px").Format("0.00"); columns.For(x => x.NextInstDate).DataType("date").Width("100px").Format("yyyy-MM-dd"); columns.For(x => x.NextInstAmount).DataType("number").Width("110px").Format("0.00"); }) .DataBind() .Render() ) </div>
Many thanks
Your code should be changed to the following:
@(Html.Infragistics().Grid(Model.Rows.AsQueryable()) .ID("vmLoanList") .Width("100%") .Caption("Loan List") .AutoGenerateColumns(false) .Columns(columns => { columns.For(x => x.Id).DataType("string").Hidden(true); columns.For(x => x.AccountNo).DataType("int").Width("40px").Template("<td class='rightAlign'>${AccountNo}</td>"); columns.For(x => x.GoodsDescription).DataType("string"); columns.For(x => x.AgreementType).DataType("string").Width("150px"); columns.For(x => x.Status).DataType("string").Width("110px"); columns.For(x => x.Balance).DataType("number").Width("110px").Format("0.00").Template("<td class='rightAlign'>${Balance}</td>"); columns.For(x => x.Arrears).DataType("number").Width("110px").Format("0.00").Template("<td class='rightAlign'>${Arrears}</td>"); columns.For(x => x.NextInstDate).DataType("date").Width("100px").Format("yyyy-MM-dd").Template("<td class='centerAlign'>${NextInstDate}</td>"); columns.For(x => x.NextInstAmount).DataType("number").Width("110px").Format("0.00").Template("<td class='rightAlign'>${NextInstAmount}</td>"); }) .DataBind() .Render())
Basically I split the row template and added the column template parts to their corresponding columns using their Template properties.
I hope this helps!
Did you have a chance to look into Stamen's suggestion? Was it helpful to you?
If you need any further assistance, please let us know.
Sincerely,
Tsanna
It did not work.
This is what I have before making the Template changes (Before01.jpg)