I have a tcxtreelist Does anyone know how to get all the checkedNodes?
I need to go through my tcxtreelist get a certain value from the tcxtreelist and write it to a string with comma delimited
Anyone can help me with this?
Thanks Kind Regards
I have a tcxtreelist Does anyone know how to get all the checkedNodes?
I need to go through my tcxtreelist get a certain value from the tcxtreelist and write it to a string with comma delimited
Anyone can help me with this?
Thanks Kind Regards
Suppose you have a
cxTreeList
with 3 columns,colChecked
,colYear
andcolMonth
.If you go to
colChecked
in the IDE, you can set itsProperties
property toCheckBox
and, at run-time, use it as a checkbox.How to get at the
Checked
value in a given tree node is actually quite simple. If you declare a variableNode : TcxTreeList node
, you can assign it to any node in the tree, as inHaving done that, you can get at the values in the three columns of the node by accessing the
Values
property of the node, which is a zero-based array of variants which represent the values stored in the node and displayed in the tree. So, you can writeand, of course, you can set the node's
Values
by assignments in the opposite direction (but don't try that with the db-aware version, TcxDBTreeList, because the displayed values are determined by the contents of the fields of the dataset connected to it).There's no need to use the
Node
local variable, I've have only in the interests of clarity. You could just as easily (but not so clearly) writeHere's some example code that sets up a cxTreeList with a checkbox column, populates it with rows, and generates a list of the rows which have the checkbox checked: