Attila Antal said:
Hi Jerry,
Controls can bind to data provided the data source, so if you have an XML file that has a large set of data that can be split into multiple parts, you will need to turn them into data sources and bind them to different controls. Since Web UI components do not do that unless they are created specifically for that reason, you will need to use other means to split the XML data into multiple chunks and convert them to data sources, and finally, bind them to individual controls. You can use the .NET Framework to read the XML content split the data into as many parts you need, and turn those into data sources.
Here is one article that may be helpful for your case: Loading a DataSet from XML.
Regards,
Attila Antal
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Thank you Attila,
Here is an example of the XML I'm using. Currently if I put this into a dataset the tree displays all nodes at the same level. It doesn't nest the nodes. I'm going to split section 1 and 2 and use 2 different radTreeViews, but I have to get them to nest first.
<
Tree
>
<
Node
Text
=
"Section 1"
Expanded
=
"True"
ID
=
"1"
>
<
Node
Text
=
"Sub-Section 1"
Expanded
=
"True"
ID
=
"10"
>
<
Node
Text
=
"Documents"
>
<
Node
Text
=
"2020"
>
</
Node
>
</
Node
>
</
Node
>
<
Node
Text
=
"Sub-Section 2"
Expanded
=
"True"
ID
=
"11"
>
<
Node
Text
=
"Documents"
>
<
Node
Text
=
"2020"
>
</
Node
>
</
Node
>
</
Node
>
</
Node
>
<
Node
Text
=
"Section 2"
Expanded
=
"True"
ID
=
"2"
>
<
Node
Text
=
"Sub-Section 1"
Expanded
=
"True"
ID
=
"20"
>
<
Node
Text
=
"Documents"
>
<
Node
Text
=
"2020"
>
</
Node
>
</
Node
>
</
Node
>
<
Node
Text
=
"Sub-Section 2"
Expanded
=
"True"
ID
=
"21"
>
<
Node
Text
=
"Documents"
>
<
Node
Text
=
"2020"
>
</
Node
>
</
Node
>
</
Node
>
</
Node
>
</
Tree
>
Here is my C# code to load the dataset into my radTreeView
DataSet ds =
new
DataSet();
ds.ReadXml(Server.MapPath(
"~/Temp.xml"
));
radtreeCol1.DataTextField =
"Text"
;
radtreeCol1.DataSource = ds;
radtreeCol1.DataBind();
Thank you for any help you can give me.