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
60
Unable to get property 'length'
posted

I am trying to evaluate this product to see if we want to use it in our project but am getting and error on the grid. 

JavaScript runtime error: Unable to get property 'length' of undefined or null reference

My grid code is

@(Html.Infragistics().Grid<MvcTestAuthData.Models.Users>()

.DataSourceUrl(Url.Action("UsersList")).ResponseDataKey("")
.ID("userList").Width("650px").Height("280px")
.LoadOnDemand(false)
.AutoGenerateColumns(false)
.Columns(column =>
{
column.For(x => x.Username).HeaderText("User Name").DataType("string");
column.For(x => x.Password).HeaderText("Password").DataType("string");
})
.Features(features =>
{
features.Paging().Type(OpType.Local).VisiblePageCount(5).ShowPageSizeDropDown(true).PageSize(10).PrevPageLabelText("Previous").NextPageLabelText("Next");
features.Sorting().Mode(SortingMode.Single).ColumnSettings(settings =>
{
settings.ColumnSetting().ColumnKey("UserName").AllowSorting(true);

});
features.Selection().MouseDragSelect(true).MultipleSelection(false).Mode(SelectionMode.Row);
})

.Width("650")
.DataBind()
.Render()
)

the data source is a function in the controller and returns a Ilist of the model class MvcTestAuthData.Models.Users

[GridDataSourceAction]

public ActionResult UsersList()
{
var service = new UsersService();
var users = service.GetUsers();
return View(users);
}

I'm not sure if i am even binding the data correctly. Using Jquery 1.7.1 and the downloaded IgniteUI 2012 Vol 2 monday so what ever version that was.

thank you

Parents Reply Children