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
close icon

TreeViewAdv Exception with CollapseAll()

I am trying to do a selection on demand method, in which a node is sought by its tag number through a combobox and a button triggers the method. Here''s the code: private void button1_Click(object sender, System.EventArgs e) { this.treeViewAdv1.CollapseAll( ); TreeNodeAdv tmp = this.treeViewAdv1.FindNode(this.comboBox1.Text); this.treeViewAdv1.SelectedNode = tmp; this.treeViewAdv1.ExtendSelectionTo(tmp); } It works fine as long as I don''t select a leaf node by clicking on the button. It throws: An unhandled exception of type ''System.NullReferenceException'' occurred in syncfusion.tools.windows.dll Regards, Tony

1 Reply

AD Administrator Syncfusion Team July 22, 2005 04:27 PM UTC

Hi Tony, I have created a sample that has the same basic functionality as the situation you describe. I was unable to reproduce the problem. Could you take a look at it and let me know if you still see the problem? Please be aware that this sample was created in our soon to be released v3.3.0.0 and will not immediately compile in older versions. To make it compile, please remove the ImagePadding code from InitializeComponent(). Regards, Gregory Austin Syncfusion Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon