showItemCheckbox();

I have a tree that needs to show and display checkboxes based upon a user selecting on option on the web page. When the user toggles between states the checkboxes dis/appear accordingly and the root tree branch refreshes (the root item attached to ). However, the root checkbox does not toggle appropriately. It only will appear if the state was set prior to the page loading. I have tried enabling and showing all checkboxes by default then toggling after the tree is in the DOM, but that does not work. Below is my code. Any help would be appreciated.

Jason

function setTreeMode(tree,mode,refreshTree)
{

// if changing states affects session data then refresh tree and global JS vars
if(refreshTree)
{
	tree.refreshItem(treeRoot);		
	tree.selectItem(treeRoot,true,false);				
	// ajax call that refreshes root branch && other misc. stuff
                     postNodeOptions(treeRoot,true,true);
	templateSelected = "";
	templateName = ""
	enableNext("",false);	
	excludedNodes = "";
	templateLoaded = "";
}	
	
tree.enableCheckBoxes(true);
tree.enableThreeStateCheckboxes(true);
tree.enableSmartCheckboxes(true);			
tree.showItemCheckbox(treeRoot,1)
	
if (mode == "single" || !mode)
{		
	tree.showItemCheckbox(treeRoot,0);
	tree.enableCheckBoxes(false);
	tree.enableThreeStateCheckboxes(false);
	tree.enableSmartCheckboxes(false);			
}	

}

Hello,

the following command hides/shows item checkbox:
tree.showItemCheckbox(itemId,0);

What id do you pass to the showItemCheckbox ? It should be the id of the item that is shown in tree. If you pass 0 - there won’t be any changes.