refreshing tree view

2 posts, 0 answers
  1. Stev
    Stev avatar
    6 posts
    Member since:
    Feb 2009

    Posted 25 Feb 2009 Link to this post


    how can i refresh/update the tree view example:

    every time that user upload the file ?

    thanx in advance,

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 26 Feb 2009 Link to this post

    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;
             BindTreeToDirectory(rootFolder, rootNode);            

Back to Top