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.
Hi Vasya,
Thanks for your reply,
I am using Infragistics 2010.2 version, so couldn't able to run the sample application. I checked the InitialDataBindDepth property and found that it is already set to '0'. But still it is showing the same error.
I am using UpdatePanel also. Is it updatepanel issue?
regards
Naresh
I modified my sample for version 10.2. I am using the latest service release for version 10.2 which is 10.2.20102.2248 and I would strongly recommend it to you as well. You can download the latest service release for your version by following these steps:
1) Go to http://ko.infragistics.com/ and log with your account.
2) Select "Account". This will open the "My keys and downloads" page.
3) Select your product from the product list.
4) Select the "Service releases" tab
There you will find the latest service release avaliable for download.
I believe the reason is not in the update panel. Please try running my application and set a breakpoint in your code behind in the NodePopulate server-side event to see whether the breakpoint is being hit when a node is expanding. If this sample is not an accurate demonstration of what you are trying to do please feel free to modify it and send it back to me.
Looking forward to hearing from you.
Please do not hesitate to contact me if you need any further assistance with this matter.