Hi,
I have a webhierarchicaldatagrid with InitialDataBindDepth = 2, and I uses RefreshBehaviors() and bind the grid again to the datasource. If I do that multiple times I get this error:
[IndexOutOfRangeException: Index was outside the bounds of the array.] Infragistics.Web.UI.GridControls.EditableBehaviorBase.LoadClientObjects(Object[] objects) +50 Infragistics.Web.UI.GridControls.Filtering.LoadClientObjects(Object[] objects) +47 Infragistics.Web.UI.Framework.ObjectBase.LoadClientState(Object[] oData) +202 Infragistics.Web.UI.Framework.ObjectBase.Infragistics.Web.UI.IClientState.LoadClientState(Object[] oData) +39 Infragistics.Web.UI.GridControls.GridBot.LoadClientCollections(Object[] collections) +375 Infragistics.Web.UI.Framework.RunBot.LoadClientData() +86 Infragistics.Web.UI.Framework.RunBot.HandleLoadPostData(String postDataKey, NameValueCollection postCollection) +41 Infragistics.Web.UI.GridControls.GridBot.HandleLoadPostData(String postDataKey, NameValueCollection postCollection) +82 Infragistics.Web.UI.GridControls.ContainerGrid.LoadPostData(String postDataKey, NameValueCollection postCollection) +98 Infragistics.Web.UI.GridControls.ContainerGrid.LoadPostData(String postDataKey, NameValueCollection postCollection) +273 Infragistics.Web.UI.GridControls.ContainerGrid.LoadPostData(String postDataKey, NameValueCollection postCollection) +273 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +1121 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2913How can I know what is the actual cause of the error and how to resolve that.Thanks,Megha
Hi Megha,
This sounds very similar to a reported internal bug. Number 81948. It is possible that it is the same issue. You could contact Developer Support to have your case attached to that bug.
Why is it that you continually call RefreshBehaviors()? Are you not able to modify your ContainerGrids directly for some reason?
regards,David Young
Hello Megha,
“RefreshBehaviors()” method is used to update the grid behaviors in order reflect the changes made in the band behaviors - http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.3/CLR4.0/html/Infragistics4.Web.v10.3~Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid~RefreshBehaviors.html
You can answer the questions that David asked you in order to supply us with more information about your exact scenario.
Thank you.
I have a webhierarchicaldatagrid to which I can apply filters and get results based on my selection. Also, I am using a search functionality to find a matching word in all the levels of my grid. If the matching text is found I expand that level and highlight the text. Now if I want to search again I want the previously searched text not to be highlighted and all the levels collapsed so that I can begin a new search. In that case I am refreshing the grid behaviors. Is there any other way I can do that ?
Megha
Thank you for the clarification.
In your scenario you can use our new Persistence Framework to save the state of the grid between Postbacks/Sessions. You can see working samples with this framework here – http://samples.infragistics.com/aspnet/Samples/PersistenceFramework/Data/PersistWHDG/Default.aspx?cn=persistence-framework&sid=87ab4c5a-3fee-4476-9dc1-38dab0e01fcd
And read the documentation here - http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.1/CLR4.0/html/PersistenceFramework_About_Persistence_Framework.html
Inform me if you require different functionality.
Let me know if you need further assistance with this question.