Using jQuery 12.1 with MVC 3 Razor
There seems to be a bug when I try to use RowTemplate with more than one hidden column.
The error is:
templatePart = $.trim(tds[i].replace("<td>", "")); infragistics.js
The workaround seems to be to add one of the columns to the row template even though it won't be shown.
Html.Infragistics().Grid<DMS.Areas.Users.Models.UserModel>(Model).ID("UserGrid")
.AutoGenerateColumns(false)
.AutoGenerateLayouts(false)
.Width("100%")
.RowTemplate("<tr><td><a href=" + Url.Content("~/Users/Details/") + "${UserID}>${UserName}</a> </td>" +
"<td>${DateAdded}</td></tr>")
.Columns(column =>
{
column.For(x => x.UserName).HeaderText("User");
column.For(x => x.DateAdded).HeaderText("Date Added");
column.For(x => x.UserID).Hidden(true);
column.For(x => x.CreatedByUserID).Hidden(true);
}).Features(features =>
features.Filtering().Mode(FilterMode.Advanced);
features.Paging().Type(OpType.Remote).PageSize(50)
.ShowPageSizeDropDown(true).PageSizeList(new List<int>{10,15,20,50})
.PrevPageLabelText(Resources.DMS.GridButtonPrevious).NextPageLabelText(Resources.DMS.GridButtonNext);
features.Sorting().Mode(SortingMode.Single);
features.Selection().MouseDragSelect(true).MultipleSelection(true).Mode(SelectionMode.Row);
features.GroupBy();//.EmptyGroupByAreaContent("");
features.Resizing();
features.Tooltips().Visibility(TooltipsVisibility.Always);
}).DataSourceUrl(Url.Action("PagingGetData", "Users", new { area = "Users" }))
.JQueryTemplating(true)
.DataBind().Render()
Hello,
I had the same problem.
Did you find a "beautifuler" workaround ? Maybe new version of JQuery components solves this problem ?
Regards,
Hardis
Hi slinex,
Try adding two empty td tags in your row template:
"<td>${DateAdded}</td><td></td><td></td></tr>")
We will look after the problem.
Thanks,