I am facing an issue that is OnNodePopulate event of WebDataTree.
If I add some nodes using javascript add method, after adding nodes "OnNodePopulate" event does not fire. It does not postback to server and gives this error:
"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format."
Please suggest asap.
thanks
Further more investigated at Event Viewer of Win XP and found this error:
Exception information: Exception type: FormatException Exception message: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Int32.Parse(String s) at Infragistics.Web.UI.NavigationControls.NavControl.ResolveItem(String fullAddress) at Infragistics.Web.UI.NavigationControls.NavBot.ResolveItem(String fullAddress) at Infragistics.Web.UI.Framework.DataTreeBot.LoadClientCollections(Object[] data) at Infragistics.Web.UI.Framework.RunBot.LoadClientData() at Infragistics.Web.UI.Framework.RunBot.HandleLoadPostData(String postDataKey, NameValueCollection postCollection) at Infragistics.Web.UI.Framework.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)
Hello Naresh,
I investigated your scenario and I what I can suggest is to ensure that the InitialDataBindDepth property of WebDataTree, which determines how many levels of nodes will be data bound when tha datatree is first displayed, is being set. You have to ensure that it`s value is set to a value diffeent than -1(which signifies that all levels will be databound). If this IntialDataBindDepth property is set to -1 the event is not going to be fired because all nodes will be populated initially.
I followed the steps that you suggested and I created a sample project that I am attaching for your reference. I added some nodes on the client side and set the InitialDataBindDepth to 0 but I was unable to reproduce the behavior that you are describing - no exception is being thrown and the breakpoin that I set in the NodePopulate event is being hit every time a node is expanded. Please run this sample on your PC; whether or not it works correctly may help indicate the nature of this issue.
If this sample is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it bac or send a small isolated sample of your own where the issue is reproducible.
I hope you find this information helpful.
Please let me know if you have any additional questions regarding this matter.