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,
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.
Hi Mike,
Thanks for replying. Can you tell me more specific on "Retrieve the value of a cell using the Cells collection of the node".
Thanks,