Hello,
I load a TreeViewComboBox with “Checkbox” TreeNodes.
After that, I would like to be notified when the Checked status is changing.
Is there an Event generated when the TreeViewComboBox get an item Checked/Uncheked ?
I couldn’t find one fired straight from a click on the checkbox. I only found Click, but that’s when the user is clicking the TreeNode.
foreach (System.Data.DataRow DR in DT.Rows)
{
TreeNode WKCTN = new TreeNode();
WKCTN.CheckBox = true;
WKCTN.Checked = true;
WKCTN.Text = DR[“FIELDNAME”].ToString();
tVcmb_WKC.Nodes.Add(WKCTN);
}
Best Regards.
Hi Eric,
The TreeViewComboBox exposes the TreeView object. The events are BeforeCheck/AfterCheck on the TreeView and the single TreeNode elements.
You can find more information here:
https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview#beforecheck
https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview#aftercheck
There is a before and after event because you can cancel the check in BeforeCheck.
The catch is that there is no event directly routed to the TreeViewComboBox, you need to use the TreeViewComboBox.TreeView property.
HTH,
Alaa
to complement my colleague answer. I adjunt a sample code for how to verify selected node and checked/uncheck node.
I hope will helpful
Please login first to submit.