Hi,
In new release load on demand stop working at all.
My sample:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="InfragisticsTests._Default" %>
<%@ Register Assembly="Infragistics35.Web.v11.1, Version=11.1.20111.2116, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.NavigationControls" TagPrefix="ig" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager runat="server" ID="scriptManager"></asp:ScriptManager> <ig:WebDataTree ID="VariablesTree" runat="server" Height="490px" Width="100%" Font-Size="Small" InitialExpandDepth="1" CheckBoxMode="BiState" EnableConnectorLines="true" AnimationDuration="300" AnimationEquationType="Linear" EnableAjax="true" InitialDataBindDepth="1" AjaxIndicator-Location="TopLeft" AjaxIndicator-RelativeToControl="True" EnableAjaxViewState="true" StyleSetName="Windows7" > <DataBindings> <ig:DataTreeNodeBinding DataMember="node" ValueField="id" TextField="text" KeyField="flags" /> <ig:DataTreeNodeBinding DataMember="root" ValueField="id" TextField="text" KeyField="flags" /> </DataBindings> </ig:WebDataTree> <asp:Label runat="server" ID="label1" text="1"></asp:Label> </div> </form></body></html>
and code
Imports System.Data.SqlClientImports System.Xml
Partial Public Class _Default Inherits System.Web.UI.Page
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init 'Dim _captcha As New Captcha.Captcha()
'form1.Controls.Add(_captcha)
'Dim obj_Type As Type = System.Reflection.Assembly.Load("Captcha, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null").GetType("Captcha.Captcha", False, True) 'Dim obj_Control As Object = obj_Type.GetConstructor(New System.Type() {}).Invoke(New Object() {}) 'form1.Controls.Add(obj_Control)
Dim connection As New SqlConnection("Server=norsql09;database=PersonicxPlanner;trusted_connection=yes")
connection.Open() Dim cmd As SqlCommand = connection.CreateCommand()
cmd.CommandText = CommandType.Text
cmd.CommandText = "SELECT [pcx].[fnx_get_variables_as_xml](@product_id) AS variablesXml" Dim param As New SqlParameter("product_id", SqlDbType.Int, 0) param.Value = 0 cmd.Parameters.Add(param) Dim reader As SqlDataReader = cmd.ExecuteReader()
reader.Read()
Dim ds As New XmlDataSource() ds.Data = reader(0) ds.ID = "test" & DateTime.Now
reader.Close() VariablesTree.DataSource = ds Session("ds") = ds connection.Close() VariablesTree.DataBind() End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load VariablesTree.DataSource = CType(Session("ds"), XmlDataSource) VariablesTree.DataBind()
End Sub
Protected Sub Page_UnLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
End Class
Tree is generated, first time all is working fine (tree is populated) but second try ends with asyn error alert box and excetpion:
Exception of type 'System.Web.HttpUnhandledException' was thrown. Stack Trace : at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.AsyncPageProcessRequestBeforeAsyncPointCancellableCallback(Object state) at System.Web.HttpContext.InvokeCancellableCallback(WaitCallback callback, Object state) at System.Web.UI.Page.AsyncPageBeginProcessRequest(HttpContext context, AsyncCallback callback, Object extraData) at ASP.apagegen_aspx.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object data) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Source :System.Web Inner Exception :Object reference not set to an instance of an object. Stack Trace : at Infragistics.Web.UI.NavigationControls.WebDataTree.CallbackCreated(CallbackObject callbackObject) at Infragistics.Web.UI.Framework.Data.HierarchicalDataBoundControlMain.Infragistics.Web.UI.IControlCallback.CallbackCreated(CallbackObject callbackObject) at Infragistics.Web.UI.Framework.RunBot.CallbackCreatedRecursive(CallbackObject callbackObject) at Infragistics.Web.UI.Framework.RunBot.HandleLoadPostData(String postDataKey, NameValueCollection postCollection) at Infragistics.Web.UI.NavigationControls.DataTreeBot.HandleLoadPostData(String postDataKey, NameValueCollection postCollection) at Infragistics.Web.UI.Framework.Data.HierarchicalDataBoundControlMain.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Source :Infragistics35.Web.v11.1
The same configuration works fine in previous SR.
It is a little funny that the main functioanlity of data tree is corrupted.
Hi
Exactly the same issue with:
Infragistics35.Web.v11.2, Version=11.2.20112.1019
The same setup, the same scenario, the same exception.
the same in the newest SR 11.1.20111.2135
Are you reading this forum?