Home - Forums-.NET - FlyTreeView (ASP.NET) - HOW TO SET NEW NODE CKECKBOX IN CLIENT

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

HOW TO SET NEW NODE CKECKBOX IN CLIENT
Link Posted: 26-Mar-2009 17:58
how to set new node checkbox and imageUrl
I create new node, but it isn"t checkbox and imageUrl

   var newNode = new CFlyTreeNode();
   var img="/Web/images/Main/Tree/01.gif";
   newNode.setImageUrl(img);

I am a student, please hlep me.
thank you !
Link Posted: 27-Mar-2009 00:04
You need to define nodetype first for nodes having checkbox:

    


Then in javascript you can do:
var node = new CFlyTreeNode();
node.setNodeTypeID("checkBoxNodeType");
node.addNode(node);
node.setText("Hi there");
node.setChecked(true);// or false
Link Posted: 27-Mar-2009 02:10
but I can't set new node ImageUrl ,when I set it ,it can't run it and  termination. when I move old node posioton,i can set  its ImageUrl . but new node can't , why??????

var newNode = new CFlyTreeNode();
var img="/Web/images/Main/Tree/01.gif";
     newNode.setImageUrl(img);
Link Posted: 27-Mar-2009 02:28
See a good example of changing/adding nodes with images:
http://www.9rays.net/asp.net_2/treeview/Demo_ClientSidePopulation.aspx
Link Posted: 27-Mar-2009 22:09
I want to set  custom ImageUrl,not is following ImageUrl
ImageUrl="$classic_folder"

how to set   custom ImageUrl

var img="/Web/images/Main/Tree/01.gif";
     newNode.setImageUrl(img);  
Link Posted: 27-Mar-2009 23:25
There should not be any problem in adding custom image.
I just opened and modified demo page (Demo_ClientSidePopulation.aspx) that has
rootNode.setImageUrl("$office2003_home");
to
rootNode.setImageUrl("Images/icon_edit.png");

Everything works as expected.
Link Posted: 28-Mar-2009 00:52
I known now, it must add to treeview and  could setImageUrl