Problem in assigning image for tree node

3 posts, 0 answers
  1. Giri
    Giri avatar
    13 posts
    Member since:
    Oct 2008

    Posted 07 Nov 2008 Link to this post

    Hi,
             I am assigning image for treenode on the page load like this 


    node.ImageUrl =

    "~/App_Images/images/R.ico";

     


              The problem is it doesnt load in the page load .After any event fire in the page only the image will load for the treenode.So initially in the page load there is no image shown only a blank background will show.
               
               Give me the solution for this.

    Regards,
    Giri
                                       
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Nov 2008 Link to this post

    Hi Giri,

    I tried assigning ImageUrl for RadTreeNode in the PageLoad event and it is commimg correctly. Here is the code I tried on my end.

    CS:
     protected void Page_Load(object sender, EventArgs e)  
        { 
            foreach (RadTreeNode node in RadTreeView1.Nodes) 
            { 
                if (node.Text == "Item1") 
                { 
                    node.ImageUrl = "Images/Pic1.gif"
                } 
            } 
        } 



    Shinu.
  3. Giri
    Giri avatar
    13 posts
    Member since:
    Oct 2008

    Posted 07 Nov 2008 Link to this post

      hi,
              I am also applying the same condition in my pageload but still the image doesn't load .But any event fire in that page the image will show otherwise it didn't show.

    The codings i am using in te page load are
                  

     

    foreach (RadTreeNode nodes in ManagerTreeView.Nodes)

     

    {

    node.ImageUrl =

    "~/App_Images/images/R.ico";

     

    }


         What is the problem here it is due to any ajax problem or anythiung else....
          Give me any other solution.It's very urgent...

    Thanks,
    Giri..




Back to Top