Home - Forums-.NET - FlyTreeView (ASP.NET) - Adding cascade checkbox behavior in runtime

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

Adding cascade checkbox behavior in runtime
Link Posted: 01-Nov-2007 10:35
Hey!

Here's my issue:

I'm creating a treeview that may or not implement the cascade check behavior (if I check a node, all it's children are checked, if I uncheck a node, it's father is also unchecked)

In runtime, as server code, i do this when i load my flytreeview data:

trvTMM.Attributes.Add(\"OnNodeEventJavascript\", \"nodeEventHandler\")
trvTMM.ContentClickTogglesCheckbox = True

I've also added the javascript code used in the demo \"http://www.9rays.net/asp.net_2/treeview/Demo_Checkboxes_Adv.aspx\" but it does not work.  It works as normal check.

If i declare on my aspx file OnNodeEventJavascript = \"nodeEventHandler\" AND ContentClickTogglesCheckbox = \"True\", the flytreeview has the correct beheavior, but, i don't want this always.

Is there a way to add the atributes OnNodeEventJavascript and ContentClickTogglesCheckbox on runtime??
Link Posted: 01-Nov-2007 20:26
From my perspective,

you just need to use original
OnNodeEventJavascript = \"nodeEventHandler\"

And modify nodeEventHandler function in order to put condition whether to run or not to run cascade  check behavior.