我需要从Telerik radDropDownTree获取所有选定的项目并在c#中创建xml文档
<telerik:RadDropDownTree ID="rddt" runat="server" CheckBoxes="TriState" DefaultMessage="Select documents" DataFieldID="ID" DataFieldParentID="parentID" DataTextField="name" DataValueField="ID" DataSourceID="ds2">
<ButtonSettings ShowCheckAll="true" ShowClear="true" />
<Localization CheckAll="Select All Resources" />
</telerik:RadDropDownTree>
如何从所选项目中获取ID和ParentID?
var xdoc = new XDocument(
new XElement("Root",
new XElement("Resource",
rddt.SelectedValue.Select(x => new XElement("ID", x)),
rddt.SelectedValue.Select(x=>new XElement("ParentID",x)))));
非常感谢