We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DockingManager in Syncfusion 4.1

I have a problem from the time that I upgrade from syncfusion 3.3 to 4.1. The problem is an exception as follow: An unhandled exception of type ''System.ArgumentOutOfRangeException'' occurred in system.windows.forms.dll Additional information: Index and length must refer to a location within the string. in line of DockControl _StateSimulationDockingManager.DockControl(this._ChannelsPropertiesPanel, this, DockingStyle.Right, channelsPropertiesWidth); I found out when I have break point above this line and then continue to run I don''t get the exception. I also found out if I have BeginInit and EndInit around the function that doing the docking I am not getting unhandled exception. But having those two lines causes that only two of my sliding panels (in right side) shows up instead of five of them. I should said I really don''t know why adding these two lines removes the exception. I think I don''t know enough about BeginInit and EndInit. I have tried to make sample code but I can''t reproduce it in sample code. Of course the sample code is very simple compare to whole application. My guess is some memory corruption may cause this since having break point clears the problem. Do you have any idea about this? I am sending the code regarding this dialog and its panels. Let me know if this helps otherwise I have to look a way to pack and zip the whole application.

3 Replies

NJ Najmeh Joze-khajavi February 2, 2006 08:34 PM UTC

Forgot to attach the file.

StateSimulation.zip


VS Vijayanand S Syncfusion Team February 3, 2006 10:35 AM UTC

Hi Najmeh, Our docking manager sets the dock label of the docking window using the Name property of the control if we have not set any dock label for it explicitly. From analysing your CS file, I can notice that the Dock control method tries to set the dock label in the same way but finds that the Name property does not contain any value. Hence, you just need to add the second statement shown below immediately after the following line and execute the application: this._ChannelsPropertiesPanel = new System.Windows.Forms.Panel(); this._ChannelsPropertiesPanel.Name="Channel Properties Panel"; I hope it helps you. Please let me know if you need any further assistance. Thanks for using Syncfusion products. Regards, Vijay


NJ Najmeh Joze-khajavi February 3, 2006 02:49 PM UTC

Your suggestion works. Thank you. But I should say I am still confuse. If we need to set the Name property why that wasn''t a problem in version 3.3 and now it is a problem. Or why the break point fix it. Also I implicitly set dock label: _StateSimulationDockingManager.SetDockLabel( this._ChannelsPropertiesPanel, this._ChannelsPropertiesPanel.Text); and I have already set what is the ChannelsPropertiesPanel.Text is this._ChannelsPropertiesPanel.Text = _stringTable.GetString("CHANNELS_PROPERTIES"); After I posted the message yesterday I found out having BeginInit and EndInit avoid the unhandled exception and reordering the DockControl statements fix the disappearing panels. That means all the five right side panels show up. I couldn''t explain the reason. Anyhow I spend two days on this and I let it go and hope this is not going to break later.

Loader.
Live Chat Icon For mobile
Up arrow icon