I have a problem using the RadTreeView which i can't figure out.
I want to create a treeview and load the content runtime as it changes depending on a selection made from a DropDownList.
I have no problem by loading the content, the problem is the styleing which i can't figure out how to control when loading the content runtime.
My HTML looks like this
<Telerik:RadTreeView runat="server" id="uiRadTreeView" Skin="Vista" Width="400px" > |
</Telerik:RadTreeView> |
My Code Behind looks like this
uiRadTreeView.Nodes.Clear(); |
SPQuery manualQuery = new SPQuery(); |
manualQuery.Query = @"<Where><Eq><FieldRef Name='Client' /><Value Type='Lookup'>"+ uiClients.SelectedItem.Text +"</Value></Eq></Where>"; |
XmlDocument xmlDoc = new XmlDocument(); |
// Write down the XML declaration |
XmlDeclaration xmlDeclaration = xmlDoc.CreateXmlDeclaration("1.0", "utf-8", null); |
// Create the root element |
XmlElement rootNode = xmlDoc.CreateElement("Tree"); |
xmlDoc.InsertBefore(xmlDeclaration, xmlDoc.DocumentElement); |
xmlDoc.AppendChild(rootNode); |
SPListItemCollection manuals = SPContext.Current.Web.Lists["Manual"].GetItems(manualQuery); |
foreach (SPListItem manual in manuals) |
{ |
XmlElement parentNode = xmlDoc.CreateElement("Node"); |
parentNode.SetAttribute("Text", manual.Title); |
SPFieldLookupValueCollection sops = new SPFieldLookupValueCollection(manual["SOP"].ToString()); |
foreach (SPFieldLookupValue sop in sops) |
{ |
XmlElement childNode = xmlDoc.CreateElement("Node"); |
childNode.SetAttribute("Text", sop.LookupValue.ToString()); |
parentNode.AppendChild(childNode); |
} |
xmlDoc.DocumentElement.AppendChild(parentNode); |
} |
uiRadTreeView.LoadXml(xmlDoc.InnerXml); |
My Screen looks like see this link http://screencast.com/t/MDYxNTU5MzY
as yo can see from the screenshot i can't see the childnodes. When clicking on the Parent node the child nodes is rendered to the right. How do i force the childnodes to be rendered to the left ?
also how can i change the styling when adding content at runtime ?
thanks for your help