The grid is bound like this:
@(Html.Kendo().Grid(Model).Name("organizationsGrid"))
The action is like this:
var model = new List<OrganizationSummaryModel> {
new OrganizationSummaryModel { Code = "Xyz", Description = "Xyz Organization" },
new OrganizationSummaryModel { Code = "Abc", Description = "Abc Organization" }
};
return View(model);
Throws this exception:
System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +64
System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item) +10635094
Kendo.Mvc.UI.Grid`1.WriteHtml(HtmlTextWriter writer) +746
Kendo.Mvc.UI.ViewComponentBase.ToHtmlString() +115
Kendo.Mvc.UI.ViewComponentBuilderBase`2.ToHtmlString() +62
System.Web.HttpUtility.HtmlEncode(Object value) +38
System.Web.WebPages.WebPageBase.Write(Object value) +68
ASP._Page_Views_account_SelectOrganization_cshtml.Execute()
Using:
Visual Studio 2010 with MVC 4 RC.