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

IMAGES NOT DISPLAYED IN RADTREEVIEW

0 Answers 47 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
subrahmanyam kameswara
Top achievements
Rank 1
subrahmanyam kameswara asked on 10 May 2010, 02:27 PM
Hi,

I am binding radtreeview dynamically from an xml file below is the code for that, I want to bind images dynamically to radtree using css file. I did enambledembededskins = false and give the skin = "x.css"

here is my problem.

1. If i am giving in html file when the radtreeview is in static binding in .aspx code it is working fine.
but when  i am loading the treeview from the xm lfile it is giving problem when I am loading the images.

 XmlDocument xDoc = new XmlDocument();
            string path = Server.MapPath("//XMLS/NewPolicyLinks.xml");
            xDoc.Load(path);
            XmlNodeList lno = xDoc.GetElementsByTagName("lno");
            rdTrNewBusiness.Nodes.Clear();
            for (int i = 0; i <= lno.Count-1; i++)
            {
                XmlNodeList entityEle = xDoc.GetElementsByTagName("Links");
                if (entityEle[i].HasChildNodes)
                {
                    XmlNode xmlNode = entityEle[i].FirstChild;
                    xmlNode = xmlNode.NextSibling;
                    rdTrNewBusiness.Nodes.Add(new RadTreeNode(xmlNode.InnerText));
                    RadTreeNode tNode1 = new RadTreeNode();

                    tNode1 = rdTrNewBusiness.Nodes[i];
                    if (rdTrNewBusiness.Nodes[i].Text == "ENTITIES")
                    {
                        tNode1.ImageUrl = "";


                    }
                }
             }


here i want to include css file dynamically to radtreeview i am using this code


i am writing this code in page load

HtmlLink cssHtmlLink = new HtmlLink();
                cssHtmlLink.Href = "~/css/Expand.css";
                cssHtmlLink.Attributes.Add("rel", "Stylesheet");
                cssHtmlLink.Attributes.Add("type", "text/css");
                cssHtmlLink.Attributes.Add("media", "all");
                this.Page.Header.Controls.Add(cssHtmlLink);
                
          


                rdTrNewBusiness.Nodes.Clear();
                
                rdTrNewBusiness.Skin = "Expand";
                rdTrNewBusiness.CssClass = "Expand";
                
                rdTrNewBusiness.EnableEmbeddedSkins = false;
                createtreenodes();


when I creating a node the image in the css file is not loading

could any one help me in binding the radtreeview using an xml file and i want to display images for +/- when expand and collapse.

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
subrahmanyam kameswara
Top achievements
Rank 1
Share this question
or