This is a migrated thread and some comments may be shown as answers.

refreshing tree view

1 Answer 107 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Stev
Top achievements
Rank 1
Stev asked on 25 Feb 2009, 09:59 AM
halo,

how can i refresh/update the tree view example:
http://demos.telerik.com/aspnet-ajax/treeview/examples/applicationscenarios/directorystructure/defaultcs.aspx

every time that user upload the file ?

thanx in advance,
Stev



1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Feb 2009, 09:59 AM

Hi Stev,

Try to call the function  "BindTreeToDirectory(rootFolder, rootNode);"  (code from the online demo you provided"  in the Upload button click as show below to refresh the treeview after uploading the files.

 protected void UpLoadButtonClick(object sender, EventArgs e)
        { 
        //Write the code to upload the file here

         string rootFolder = Server.MapPath(".");        
         RadTreeNode rootNode = new RadTreeNode(Path.GetFileName(rootFolder));
         rootNode.ImageUrl = "Images/folder.gif";
         rootNode.Expanded = true;
         RadTreeView1.Nodes.Add(rootNode);
         BindTreeToDirectory(rootFolder, rootNode);            
         }
-shinu.


           
Tags
TreeView
Asked by
Stev
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or