How to get selected datavalueField in c#

1 posts, 0 answers
  1. Guru
    Guru avatar
    1 posts
    Member since:
    Apr 2013

    Posted 04 Sep 2013 Link to this post

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

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

Back to Top