This question is locked. New answers and comments are not allowed.
Hi there,
I am new to ASP.NET MVC and Telerik and just starting out with these technology. I am following the introduction documentation that came with the Telerik Extensions for ASP.NET MVC with trying to build a Grid in my application.
After creating the controller to reference my model, I am now stuck at binding the model to my view page.
This is the code from my index.aspx:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Telerik1.Models.Order>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%= Html.Telerik().Grid(Model)
.Name("OrdersGrid")
.Columns(colums =>
{
colums.Bound(o => o.OrderID);
colums.Bound(o => o.ShipAddress);
colums.Bound(o => o.RequiredDate);
})
.Pageable()
.Sortable()
%>
</asp:Content>
Somehow Visual Studio 2010 is telling me that <%= Html.Telerik().Grid(Model) is an error. CS0411: The type arguments for method 'Telerik.Web.Mvc.UI.ViewComponentFactory.Grid<T>(System.Collections.Generic.IEnumerable<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
Can someone please tell me where I am going wrong?
I am new to ASP.NET MVC and Telerik and just starting out with these technology. I am following the introduction documentation that came with the Telerik Extensions for ASP.NET MVC with trying to build a Grid in my application.
After creating the controller to reference my model, I am now stuck at binding the model to my view page.
This is the code from my index.aspx:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Telerik1.Models.Order>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%= Html.Telerik().Grid(Model)
.Name("OrdersGrid")
.Columns(colums =>
{
colums.Bound(o => o.OrderID);
colums.Bound(o => o.ShipAddress);
colums.Bound(o => o.RequiredDate);
})
.Pageable()
.Sortable()
%>
</asp:Content>
Somehow Visual Studio 2010 is telling me that <%= Html.Telerik().Grid(Model) is an error. CS0411: The type arguments for method 'Telerik.Web.Mvc.UI.ViewComponentFactory.Grid<T>(System.Collections.Generic.IEnumerable<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
Can someone please tell me where I am going wrong?