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

TreeView Selection Problem

I am using a TreeViewAdv. Here my requirement is to pupulate a TreeView when a button is clicked & the text on button should be the default selection in the treeview. I am able to do that but only problem I face is the way the node is selected. Here I use the following code to select the node TV.SelectedNode=node; TV.SelectedNode.BringIntoView(); where TV is my TreeViewAdv & node is TreeNodeAdv. Pls check the attached images to get a better Idea about my problem. Thanks Images_902.zip

6 Replies

VS Vijayanand S Syncfusion Team August 18, 2005 09:36 AM

Hi Vinay, You could use the following code for this purpose this.treeViewAdv1.Focus(); Please take look at this test sample and let me know if you have any questions. We appreciate your interest in Syncfusion products. Thanks, Vijay


VI Vinay August 18, 2005 10:12 AM

Hi Vijay, Sample works fine, but when I try to put the same code in my application it doesnot work. when I try TV.SelectedNode=node; TV.SelectedNode.BringIntoView(); TV.Focus(); Console.WriteLine("Focus Value : " + TV.Focus()); Focus Value : False Also tried TV.SelectedNode=node; TV.Focus(); Console.WriteLine("Focus Value : " + TV.Focus()); Focus Value : False Can you tell me what could be the reason. Thanks for early response


VS Vijayanand S Syncfusion Team August 18, 2005 10:35 AM

Hi Vinay, I was unable to see that "false" value in my appllication and I could not predict what is that reason for your application. Could you please send me your sample otherwise modify my sample according to show that issue. Thanks, Vijay


VI Vinay August 18, 2005 10:52 AM

Here my TreeViewAdv inside a Tabcontrol this is a user control & this particular User Control is called from a Windows Form. Could this be a reason.


VS Vijayanand S Syncfusion Team August 19, 2005 04:40 AM

Hi Vinay, I am afraid, I am not able to understand what you have done in your project. Could you please provide me more information? I have attached a modified sample according to your requirement. Please let me know if it helps. I would appreciate it, if you could create a test sample or modify the above sample and send it over to us. It will help us to investigate and give exact solution. If you wish to maintain the confidentiality of your sample, please create a Direct-Trac incident in this regard and mention the link to this forum post. Please let me know if you have any questions. Thanks for your patience. Regards Vijay


VI Vinay August 22, 2005 11:18 AM

Hi Vijay, Thanks for the modified code. I tried some options and luckly one worked. Now my problem is solved. Thanks Vinay

Loader.
Live Chat Icon For mobile
Up arrow icon