Avaricesoft’s Weblog

Just another WordPress.com weblog

Archive for December, 2009

Add Node in the Telerik Rad Controls

Posted by avaricesoft on December 17, 2009

here is the solution:

protected void AddRootTreeViewNode(string text)
{
RadTreeNode rtn = new RadTreeNode(); //Make RadTreeNode object for filling data

rtn.Text = text; //add the add in the node
RadTreeNode parent = RadTreeView1.Nodes[0] ; /* find the node which are on statically define in the client side.. suppose if you make the node in the aspx file statically then you find the root node */

parent.Nodes.Add(rtn); //Add the node in the root node the you see the hierarchy of the node. all the given node are added below the root node.

}

protected void test_Click(object sender, EventArgs e) //call the above function
{
AddRootTreeViewNode(“1″);
AddRootTreeViewNode(“2″);
AddRootTreeViewNode(“3″);
}

Thanks.

Regards,
Muhammad Kalim
Manager Business Development
muhammad.kalim@avaricesoft.net
www.avaricesoft.net
AddRootTreeViewNode(“1″);
AddRootTreeViewNode(“2″);
AddRootTreeViewNode(“3″);

Posted in Telerik Rad Controls | Tagged: , , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.