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

Problem in assigning image for tree node

2 Answers 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Giri
Top achievements
Rank 1
Giri asked on 07 Nov 2008, 06:41 AM
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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Nov 2008, 06:49 AM
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.
0
Giri
Top achievements
Rank 1
answered on 07 Nov 2008, 09:12 AM
 

"~/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..




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