Home - Forums-.NET - FlyTreeView (ASP.NET) - Checkboxes not refreshing when running Client side script

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

Checkboxes not refreshing when running Client side script
Link Posted: 17-Mar-2006 03:04
I'm creating an app currently where the user can tick the check boxes.

if the user ticks a node which has children then all of the children and their childrens children should be ticked similarly un ticking a parent unticks all of the children.

this is the javascript that I'm using.

function handleNodeEvent()
{
  var node = window.event.node;
  if(window.event.eventName == 'ONCHECKED')
  {
    CheckChildren(node,true);
  }
  if(window.event.eventName == 'ONUNCHECKED')
  {
    CheckChildren(node,false);
  }
}

function CheckChildren(node,check)
{
  if(node.Nodes.length != 0)
  {
    for(i=0;i    {
      node.Nodes[i].IsChecked = check;
      CheckChildren(node.Nodes[i],check)
    }
  }
}


I dont want to use server side code becuase it takes a while to reload the nodes (theres quite a few of them).

the above code seems to work execpt the nodes checkboxes dont seem to update until you roll over and fire another event.

am I missing something ?

also I was given this control to use from my boss. it seems great but I cant find much documentaion online or otherwise. the only thing I can find is a Class Reference. is there anymore ?

I should also mention that I'm using version 3.6.1.9 since our company hasnt moved over to .NET 2.0 yet.
Link Posted: 20-Mar-2006 06:16
I've since found

node.CheckBoxChange()

which sort my problem of checking and unchecking is there a similar method for making check boxes appear/disapear or enable/disable ?
Link Posted: 20-Mar-2006 10:31
Switching IsCheckbox can be done through the server-side code only. And thus it will require postback then.
Link Posted: 20-Mar-2006 22:38
is the same true for node.CanBeSelected , node.Disabled and node.IsCheckBox ?
Link Posted: 22-Mar-2006 07:37
The CanBeSelected property can be managed through client script.