首页 文章

元素'RadGrid'不是已知元素

提问于
浏览
0

我正在尝试使用Telerik RadGrid,但我收到以下警告:

“元素'RadGrid'不是已知元素 . 如果网站中存在编译错误,或者缺少web.config文件,则会发生这种情况 . ”

以下是我已经检查过的一些内容:

  • web.config文件isn 't missing, and there aren' t页面上的任何其他编译问题 .

  • Telerik.Web.UI dll位于GAC中,项目的引用指向该文件 . 没有Telerik dll在bin文件夹中 .

  • 程序集在web.config中添加,在程序集部分中使用它: <add assembly="Telerik.Web.UI, Version=2011.1.413.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>

  • RadGrid的属性工作,因此Visual Studio能够找出对象是什么

  • 页面正常运行,我只是有一组恼人的警告 .

  • 我尝试在页面上为Telerik程序集添加@Register语句,但没有变化

  • 我试过清理/重建,但没有改变

  • 我尝试重启Visual Studio,没有变化

  • 我试过重启机器,没有变化

编辑:这是我正在使用的标记 .

<%@ Page Title="" Language="C#" MasterPageFile="~/masterPages/ActionAreaSinglePanelMaster.Master" AutoEventWireup="true" CodeBehind="overview.aspx.cs" Inherits="Compass.overview" %>


<asp:Content ID="PanelHeaderContent" ContentPlaceHolderID="PanelHeaderPlaceholder" runat="server">
    <p>Panel header</p>
</asp:Content>


<asp:Content ID="PanelContent" ContentPlaceHolderID="PanelDataPlaceholder" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../Scripts/radGridLayout.js" type="text/javascript"></script>
    <script type="text/javascript">
        panelGridID = "<%=panelGrid.ClientID %>";
    </script>

    <asp:ObjectDataSource ID="BundleItemsSource" runat="server" TypeName="Compass.Data.CompassUI" SelectMethod="BundleDataSet">
        <SelectParameters>
            <asp:QueryStringParameter Name="bundleID" QueryStringField="bundle" />
        </SelectParameters>
    </asp:ObjectDataSource>

    <telerik:RadGrid id="panelGrid" runat="server" DataSourceID="BundleItemsSource" Height="100%" Width="100%">
        <ClientSettings>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            <ClientEvents OnGridCreated="gridCreated" />
        </ClientSettings>
    </telerik:RadGrid>

</asp:Content>

2 回答

  • 1

    更改Assembly属性以删除特定版本,公钥等,显然修复了问题 .

  • 2

    关闭Visual Studio,删除架构缓存,然后重新打开Visual Studio . 您可以在以下内容下找到模式:

    C:\Users\karthik\AppData\Roaming\Microsoft\VisualStudio\10.0\ReflectedSchemas
    

    删除此文件夹中的所有文件是安全的 .

相关问题