Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
Bug with iGgrid rowtemplating
posted

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:

tds[i] is undefined

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()

 

Parents
  • 3115
    Verified Answer
    Offline posted

    Hi slinex,

    Try adding two empty td tags in your row template:

    .RowTemplate("<tr><td><a href=" + Url.Content("~/Users/Details/") + "${UserID}>${UserName}</a> </td>" +

    "<td>${DateAdded}</td><td></td><td></td></tr>")

    We will look after the problem.

    Thanks,

     

Reply Children
No Data