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: Data from Database, index from database, best practice?

As a beginner using TreeView I don't understand how to work with data.
I want to show data from a table with a primary key. But I don't want to show this key, only some data fields.

But... 
When the user select a row, I want to work with the Primary key.

How do I store the key in a node? Are there unvisible datafields?

Thank for a answer for this very beginner question…..

3 Replies

AA Arulraj A Syncfusion Team March 26, 2019 12:24 PM UTC

Hi Roland, 

Thanks for using Syncfusion product. 

From your update, we suspect that your requirement is to bind data table to the MultiColumnTreeView. If so, we suggest you to use our SfTreeGrid control which offers you the advanced features. Please refer the below link to know more about the SfTreeGrid control 

Let us know whether this helps also if you need any further assistance on this. 

Arulraj A 



RW Roland Weber March 26, 2019 02:04 PM UTC

I want to use TreeViewAdv, but, when you tell me, I have nearly the same possibilitys for the layout (Icons, Selection) with sfTreeGrid, I try the sfTreeGrid.

If I would work wit TreeViewAdv, is it normaly to use the tags from each node to store further informations?

Regards
Roland



AA Arulraj A Syncfusion Team March 27, 2019 09:01 AM UTC

Hi Roland,  

Thanks for the update. 

Yes, you can use the Tag property to store your Node related data in it. Please go through the remarks for the Tag property, 
// Remarks: 
//     Any Object derived type may be assigned to this property. If this property is 
//     being set through the Windows Forms designer, only text may be assigned. When 
//     the tree node is cloned, if this object is cloneable (implements ICloneable interface) 
//     then it will be. 

Please let us know if you need any further details on this. 

Arulraj A 


Loader.
Live Chat Icon For mobile
Up arrow icon