Home - Forums-.NET - FlyTreeView (ASP.NET) - Partially checked checkboxes

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Partially checked checkboxes
Link Posted: 09-Oct-2006 03:09
Has anyone used NineRays Treeview to create a partially checked checkbox.

i.e. If any of my children are checked I have a grayed checkbox, but if all of my children are checked, my checkbox is normal.

I experimented with NodeTypes as a solution for this, but wasn't successful.

Thanks,
Doug Mair
Link Posted: 09-Oct-2006 12:27
The Checked property is a boolean one. So partial-checked checkboxes seems to be a rather complex task that required both server and client-side control code modification.
Link Posted: 04-Jan-2007 10:19
We have partially checked boxes implemented, and as answered it involves changing node.htc file and some server side attributes attachement to the nodes, and then some javascript to keep track which nodes have been checked outside of the flytreeview mechanism. Add ajax in a picture and it gets really tricky.
Link Posted: 04-Jan-2007 13:35
Now thinking about it, it should not be that hard to keep track of third state. You have nodes collection, get the count of nodes, get count of checked nodes. If different and greater then one then your parent is in third state. That should not be that hard.