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.
Unfortunately, activation email could not send to your email. Please try again.

Select node from server side

Thread ID:

Created:

Updated:

Platform:

Replies:

130861 Jun 7,2017 06:52 AM Jun 8,2017 02:54 AM ASP.NET Web Forms 1
loading
Tags: TreeView
Armand De Lange
Asked On June 7, 2017 06:52 AM

Is there a way to select a node from server side?

Ashokkumar Balasubramanian [Syncfusion]
Replied On June 8, 2017 02:54 AM

Hi Armand,   
Thanks for contacting Syncfusion support.   
We can use SelectNode and SelectedNodes properties of TreeView to select node/nodes in the TreeView from server side. Please check the below code snippets.   
[Server Side] 
protected void Button1_Click(object Sender, Syncfusion.JavaScript.Web.ButtonEventArgs e) 
{ 
      // Pass the index value to selected nodes API 
      int[] array = { 1, 2, 3, 4, 5 }; 
      //should enable AllowMultiSelection API to select more than one nodes in treeview 
      this.TreeView1.SelectedNodes = array.ToList();  
} 
 
 
For your reference, we have prepared a simple sample, please check the sample in below location. 
 
 
Please let us know, if the provided informations are helful or not. 
 
Regards, 
Ashokkumar B.  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;