I implemented a ultretree with nodes that their first column is a checkbox, with all boxes unchecked. However, the default behavior of the checkbox seems to be 'tristate", as seen on the screen print:
For example, the first two nodes' (marked as yellow) checkbox have blue background (represent null state?). I have to click it once to make the blue backqround turn to gray (uncheck). I have to then click it again to check the checkbox.
How do I set up the checkboxes so they default to "uncheck" state and users has to click on it only once to check it?
Here is the codes I have:
_icd10ColSet = New UltraTreeColumnSet()
_icd10ColSet.ColumnAutoSizeMode = UltraWinTree.ColumnAutoSizeMode.AllNodesWithDescendants
_icd10ColSet.Key =
Dim chkICD10 As UltraTreeNodeColumn = _icd10ColSet.Columns.Add("S")
chkICD10.DataType =
_icd10ColSet.Columns.Add(
chkICD10.AllowCellEdit = AllowCellEdit.Full
treeView.ColumnSettings.ColumnSets.Add(_icd10ColSet)
.........
Thanks,
Steve
Hi Steve,
The default value of any cell is null. So you need to explicitly set the value on these cells to false.
If your tree is bound to a DataSource, then the easiest thing to do is use the InitializeDataNode event and populate the value of the unbound checkbox cell in the node the first time the node is initialized (e.ReInitialize == false).
If your tree is not bound, then you can just set the cell value to false when you add the node to the tree.