【问题标题】:Bind Telerik Grid绑定 Telerik 网格
【发布时间】:2013-03-23 09:44:56
【问题描述】:

我正在用名为“Employee”的模型绑定如下所示的 Grid

<%= Html.Telerik().Grid<Employee>() 
             .Name( "EmployeeGrid" ) 
    .Columns(colums => colums.Bound(E => E.EmployeeID)) %>   


But I am getting the below error in this line Grid<Employee>() 

找不到类型或命名空间名称“Employee”

我在一个视图中有三个网格,因此我无法在第一行视图中使用 @model 引用任何特定的模型名称。

【问题讨论】:

    标签: telerik


    【解决方案1】:

    错误告诉您 View 不知道 Type 'Employee' 。 你必须在第一行写:

    <%@ Import namespace="MyProgram.FolderOfEmployeeClass" %>
    

    aspx文件中using语句的信息:

    Is it possible to use the 'using' statement in my aspx views? (ASP.NET MVC)

    忠告: 使用 Razor 引擎而不是 aspx。这更容易使用!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-11
      • 1970-01-01
      • 2012-02-17
      • 1970-01-01
      • 2012-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多