Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Frnds, I am priya. i am struggling to get my head around raddropdowntree.
i used this in my asp.net web app using c#.

i added the following code
in aspx file
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

and

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<telerik:RadDropDownTree runat="server" ID="RadDocument" Skin="Telerik" Width="250px"
DefaultMessage ="Choose a document" DefaultValue="0" DataFieldID="ID" DataFieldParentID="ParentID" DataTextField="Text">
<dropdownsettings height="140px">



in aspx.cs file

public DataTable GetData()
{
DataSet ds = new DataSet();
DataTable table = new DataTable();
table.Columns.Add("ID");
table.Columns.Add("ParentID");
table.Columns.Add("Value");
table.Columns.Add("Text");
table.Rows.Add(new String[] { "1", null, "Africa" });
table.Rows.Add(new String[] { "2", "1", "Egypt" });
table.Rows.Add(new String[] { "3", "2", "Cairo" });
table.Rows.Add(new String[] { "4", "1", "South Africa" });
table.Rows.Add(new String[] { "5", "4", "Cape Town" });
return table;
}

i attached data to raddropdowntree
protected void Page_Load(object sender, EventArgs e)
{
RadDocument.DataSource = GetData();
RadDocument.DataBind();
RadDocument.ExpandAllDropDownNodes();
}


but when i run the app, it is showing control alone with "choose a document" text. it is not dropping down when i click on it. please kindly help me.
Posted
Updated 10-Apr-14 1:29am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900