Hi IG Team,
we are already used ultrawebtree control. now upgrading latest version 2015-v1. pack.
already they used without binding xmldatasource in ultrawebtree control . if it's possible can binding the webdatatree control. ?
already they used ReadXmlDoc property to binding the data in ultrawebtree control . this property equal ? in latest WebDatatTree control.
Thanks & Regards
Nagarajan P
Hello,
There are a couple of options to bind to XML DataSource when using the new WebDataTree control. Please notice these include either using the XML DataSource provider or setting the dataSource and binding to it.
I have attached a sample which demonstrate the WebDataTree bound to a XmlDataSource. To learn more about the WebDataTree, I strongly suggest to review the help topics and documentation linked below: Documentation for WebDataTree Binding to XML DataSource WebDataTree Template Sample
What is more, please notice there are many similar topics in this forum related to migrating the UltraWebTree, so it is always a good idea to browse through the WebDataTree section as most of the questions you will come by are already answered.
Thanks for Replay IVaylo .
My Problem is . I have xslt one file and xml . if xml file read from db side (store procedure) . if each node & sub node click and retrieve from xml file db side .
now am using xml datasource it's only binding xslt file . it's style purpose only using . it's not binding xml file value. I need help how to use xslt file & xml file also .in xmldatasource . can you share with your contact number . I will call you .
But older code was working fine . they are not using xml datasource . only using ultrawebtree control . and binding property Readxmldoc . it's working fine .
9894916082
Hello Nagarajan,
I have some difficulties understanding the exact scenario. From what I understand, you were using the xslt & xml files to control how the tree should be rendered based on the styling / templating in the xslt file. If this is the case, please notice there is no such property in the new WebDataTree as ReadXmlDoc property.
However, it is possible to use the functionality if the XmlDateSource Control and specify the XML data files for styling/templating - you typically load the style sheet from a file, which you specify using the TransformFile property. However, you can also load the style sheet directly from a string using the Transform property.
For example:<ig:WebDataTree ID=" WebDataTree_PeopleTreeView" runat="server" Height="100%" Width="100%" DataSourceID="PeopleDataSource"> <DataBindings> <ig:DataTreeNodeBinding DataMember="Name" TextField="#InnerText" /> </DataBindings> </ig:WebDataTree><asp:XmlDataSource ID="PeopleDataSource" runat="server" DataFile="~/people.xml" TransformFile="~/template.xsl" />
Please refer to the runnable code attachment in my reply. It contains WebDataTree1 bound to xml data source. WebDataTree_PeopleTreeView – the one illustrating this scenario and standard TreeView1 for comparison.
For a detailed explanation how to use this Control, refer to the official documentation: XmlDataSource Web Server Control Overview
Relevant Information to read:
Please let me know how this approach works for you.
Thanks For Replay Ivaylo.
Your said is exactly correct . here attached my xslt file . for xml file read from db side . see the below code .
SqlConnection mysqlConn = new SqlConnection();
mysqlConn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["RMM_ProductValuation_DEVConnectionString"].ConnectionString;
XmlDocument myXmlDoc = new XmlDocument();
XmlReader myXmlDataReader;
myXmlDataReader = SqlHelper.ExecuteXmlReader(mysqlConn, CommandType.StoredProcedure, "spsBookHierarchyRootNodesXml");
myXmlDoc.Load(myXmlDataReader);
XmlDocument myTransFormedDoc = TransformDoc(myXmlDoc);
xsd.Data = myTransFormedDoc.OuterXml;
TreeView1.DataSource = xsd;
TreeView1.DataBind(); //
I want to know which property is binding the Textfield value . in xslt file property is Text1. if set Text1 property the compiler throw error . no Text1 property
please guide me . what can I do ? or please share with your contact no . I will call you .
Just in case you are uncertain how to work with XSL, XML, XSLT, I suggest you to get advantage of the available online resources like:
https://www.w3.org/Style/XSL/WhatIsXSL.html http://www.w3schools.com/
etc.