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

How to get selected datavalueField in c#

0 Answers 45 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Guru
Top achievements
Rank 1
Guru asked on 04 Sep 2013, 10:01 AM
I need to get all the selected items from RadDropDownTree and change it to XML format


<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>

How can I get the DataFieldID and DataFieldParentID value from dropdowntree selected value?

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)))));

Thanks,

No answers yet. Maybe you can help?

Tags
DropDownTree
Asked by
Guru
Top achievements
Rank 1
Share this question
or