Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3555
Get the value of a hidden column of Wintree
posted

Hello,

I have a WinTree populated from a resultSet of my database. The resultset have 3 columns: EmployeeID, LastName, and Parent where EmployeeID and Parent have a relationship for the tree.

I am using standard view for the tree and the column LastName is set for the NodeTextColumn.  What I want is when I click on one of the node of the tree, I can get the EmployeeID value of the selected Node, NOT the LastName value. How can I achieve this?

I also try to use the grid view for the tree and hide the unwanted columns (EmployeeID and Parent) since I think the grid view will allow me to do more task in the future with my tree.  However, I don't like it to show the ColumnHeader.  How do I hide it?

Thank you, 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    To hide columns in grid style, you need to set the LabelPosition property property to None. You can retrieve the value of a cell using the Cells collection of the node. It should not matter if the column is hidden. 

    In standard style, I think you can still use the Cells collection, as long as the column exists in the ColumnSet.

    If not, another way to get the value of any field would be to access the ListObject property of the node, which will return the underlying data object the node is bound to.  

Children