0

我想我阅读了有关此错误的所有 Infragistics 和 StackOverflow 帖子,但我无法确定我的问题。我正在使用:

Infragistics4, v11.2 Visual Studio 2012 及其 IIS DotNetNuke 6.1 我有一个三层分层网格。扩展第一级时没有问题。这是一些代码

public void Page_Init(object sender, System.EventArgs e)
{
  this.reportGrid.RowIslandsPopulating += (s, arg) => reportGrid_RowIslandsPopulating(s, arg);
  this.reportGrid.PreRender += (s, arg) => reportGrid_PreRender(s, arg);
  this.reportGrid.InitializeRow += (s, arg) => reportGrid_InitializeRow(s, arg);
}

protected void Page_Load(object sender, System.EventArgs e)
{
   if (IsPostBack)
   {

     if (AppSettings.IsAjaxPostBack)
     {
       reportGrid.DataSource = report.Universities;
       reportGrid.DataBind();
     }
     else
    {
      DoSearch();
     }
} 

void reportGrid_RowIslandsPopulating(object sender, ContainerRowCancelEventArgs e)
{
  e.Cancel = true;
  switch (e.Row.Level)
  {
    case 0:
      BindSecondLevel(e);
      break;
    case 1:
      BindThirdLevel(e);
      break;
  }
}

void reportGrid_InitializeRow(object sender, RowEventArgs e)
{
  if (((ContainerGridRecord)e.Row).Level < 2)
     ((ContainerGridRecord)e.Row).IsEmptyParent = true;
}

private void BindSecondLevel(ContainerRowCancelEventArgs e)
{
  var child = new ContainerGrid();
  e.Row.RowIslands.Add(child);
  child.Level = 1;
  child.AutoGenerateColumns = false;
  child.DataKeyFields = "DisciplineID";
  child.Columns.Add(new BoundDataField(false) { Key = "DisciplineID", DataFieldName = "DisciplineID", Hidden = true });
  child.Columns.Add(new BoundDataField(false) { Key = "Name", DataFieldName = "Name" });
  child.ViewStateMode = System.Web.UI.ViewStateMode.Disabled;

  child.DataSource = someDisciplines;
  child.DataBind();
}

当我单击第二级展开按钮时,它会抛出:

脚本块中第 22 行第 34 列未处理的异常

0x800a139e - Microsoft JScript 运行时错误:无法加载 ASP.NET Ajax 客户端框架

EDIT1:我发现扩展第二级行时AppSettings.IsAjaxPostBack等于false,但是扩展第一级行时等于true

EDIT2:web.config

<system.webServer>
        <modules>
            <add name="Compression" type="DotNetNuke.HttpModules.Compression.CompressionModule, DotNetNuke.HttpModules" preCondition="managedHandler"/>
            <add name="RequestFilter" type="DotNetNuke.HttpModules.RequestFilter.RequestFilterModule, DotNetNuke.HttpModules" preCondition="managedHandler"/>
            <add name="UrlRewrite" type="DotNetNuke.HttpModules.UrlRewriteModule, DotNetNuke.HttpModules" preCondition="managedHandler"/>
            <add name="Exception" type="DotNetNuke.HttpModules.Exceptions.ExceptionModule, DotNetNuke.HttpModules" preCondition="managedHandler"/>
            <add name="UsersOnline" type="DotNetNuke.HttpModules.UsersOnline.UsersOnlineModule, DotNetNuke.HttpModules" preCondition="managedHandler"/>
            <add name="DNNMembership" type="DotNetNuke.HttpModules.Membership.MembershipModule, DotNetNuke.HttpModules" preCondition="managedHandler"/>
            <add name="Personalization" type="DotNetNuke.HttpModules.Personalization.PersonalizationModule, DotNetNuke.HttpModules" preCondition="managedHandler"/>
            <add name="Analytics" type="DotNetNuke.HttpModules.Analytics.AnalyticsModule, DotNetNuke.HttpModules" preCondition="managedHandler"/>
            <add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" preCondition="managedHandler"/>
            <add name="MobileRedirect" type="DotNetNuke.HttpModules.MobileRedirectModule, DotNetNuke.HttpModules" preCondition="managedHandler"/>
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler"/>
        </modules>
        <handlers>
            <add name="LogoffHandler*" path="Logoff.aspx" verb="*" type="DotNetNuke.Services.Authentication.LogOffHandler, DotNetNuke" preCondition="integratedMode"/>
            <add name="RSSHandler" path="RSS.aspx" verb="*" type="DotNetNuke.Services.Syndication.RssHandler, DotNetNuke" preCondition="integratedMode"/>
            <add name="LinkClickHandler" path="LinkClick.aspx" verb="*" type="DotNetNuke.Services.FileSystem.FileServerHandler, DotNetNuke" preCondition="integratedMode"/>
            <add name="CaptchaHandler" path="*.captcha.aspx" verb="*" type="DotNetNuke.UI.WebControls.CaptchaHandler, DotNetNuke" preCondition="integratedMode"/>
            <add name="UserProfilePageHandler" path="User.aspx" verb="*" type="DotNetNuke.Services.UserProfile.UserProfilePageHandler, DotNetNuke" preCondition="integratedMode"/>
            <add name="RadProgressHandler" verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode"/>
            <add name="ClientDependencyHandler" verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core" preCondition="integratedMode"/>
            <add name="Telerik.Web.UI.WebResource" verb="*" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode"/>
            <add name="Telerik.Web.UI.ChartHttpHandler" verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
            <add name="SitemapHandler" path="Sitemap.aspx" verb="*" type="DotNetNuke.Services.Sitemap.SitemapHandler, DotNetNuke" preCondition="integratedMode"/>
            <add name="HtmTemplateFileHandler" verb="*" path="*.htmtemplate" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.HtmTemplateFileHandler, DotNetNuke.HtmlEditor.TelerikEditorProvider" preCondition="integratedMode"/>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory"/>
            <remove name="ScriptHandlerFactoryAppServices"/>
            <remove name="ScriptResource"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </handlers>
        <validation validateIntegratedModeConfiguration="false"/>
    </system.webServer>
<system.web>

        <!-- HttpModules for Common Functionality -->
        <httpModules>
            <!-- add name="Authentication" type="DotNetNuke.HttpModules.AuthenticationModule, DotNetNuke.HttpModules.Authentication" / -->
            <add name="Compression" type="DotNetNuke.HttpModules.Compression.CompressionModule, DotNetNuke.HttpModules"/>
            <add name="RequestFilter" type="DotNetNuke.HttpModules.RequestFilter.RequestFilterModule, DotNetNuke.HttpModules"/>
            <add name="UrlRewrite" type="DotNetNuke.HttpModules.UrlRewriteModule, DotNetNuke.HttpModules"/>
            <add name="Exception" type="DotNetNuke.HttpModules.Exceptions.ExceptionModule, DotNetNuke.HttpModules"/>
            <add name="UsersOnline" type="DotNetNuke.HttpModules.UsersOnline.UsersOnlineModule, DotNetNuke.HttpModules"/>
            <add name="DNNMembership" type="DotNetNuke.HttpModules.Membership.MembershipModule, DotNetNuke.HttpModules"/>
            <add name="Personalization" type="DotNetNuke.HttpModules.Personalization.PersonalizationModule, DotNetNuke.HttpModules"/>
            <add name="Analytics" type="DotNetNuke.HttpModules.Analytics.AnalyticsModule, DotNetNuke.HttpModules"/>
            <add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core"/>
            <add name="MobileRedirect" type="DotNetNuke.HttpModules.MobileRedirectModule, DotNetNuke.HttpModules"/>
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/>
        </httpModules>
        <httpHandlers>
            <!-- This is for CAPTCHA support -->
            <add verb="*" path="*.captcha.aspx" type="DotNetNuke.UI.WebControls.CaptchaHandler, DotNetNuke"/>
            <!-- This is for Serving files, secure, insecure, from database -->
            <add verb="*" path="LinkClick.aspx" type="DotNetNuke.Services.FileSystem.FileServerHandler, DotNetNuke"/>
            <!-- This adds syndication support -->
            <add verb="*" path="RSS.aspx" type="DotNetNuke.Services.Syndication.RssHandler, DotNetNuke"/>
            <!-- This adds legacy support for the Logoff page -->
            <add verb="*" path="Logoff.aspx" type="DotNetNuke.Services.Authentication.LogOffHandler, DotNetNuke"/>
            <!-- ASP.NET AJAX support -->
            <add path="User.aspx" verb="*" type="DotNetNuke.Services.UserProfile.UserProfilePageHandler, DotNetNuke"/>
            <add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"/>
            <add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core"/>
            <add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core "/>
            <add verb="*" path="Telerik.Web.UI.WebResource.axd" validate="false" type="Telerik.Web.UI.WebResource, Telerik.Web.UI"/>
            <add verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="true"/>
            <add verb="*" path="Sitemap.aspx" type="DotNetNuke.Services.Sitemap.SitemapHandler, DotNetNuke"/>
            <add verb="*" path="*.htmtemplate" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.HtmTemplateFileHandler, DotNetNuke.HtmlEditor.TelerikEditorProvider"/>
        </httpHandlers>
...
</system.web>

EDIT3:第二级的扩展也不适用于清晰的网站(我的意思不是DotNetNuke)

Edit4:我附上了一个样本 http://ckpi-bg.com/sample.rar

4

1 回答 1

0

我发现了问题。它是 EnableViewState = False。我无法向自己解释为什么在 EnableViewState = False 时扩展第一级有效,但第二级无效。

于 2012-12-27T11:37:27.477 回答