本文介绍了Raddropdownt在运行时没有使用c#在asp.net web app中下降的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨Frnds,我是priya。我正在努力让我的头围绕raddropdowntree。

我使用c#在我的asp.net网络应用程序中使用它。



i在aspx文件中添加了以下代码



<%@ Register Assembly =Telerik.Web .UINamespace =Telerik.Web.UITagPrefix =telerik%>







< telerik:RadScriptManager ID =RadScriptManager1runat =server>

< telerik:RadDropDownTree runat =serverID =RadDocumentSkin =TelerikWidth = 250px

DefaultMessage =选择文档DefaultValue =0DataFieldID =IDDataFieldParentID =ParentIDDataTextField =Text>

< dropdownsettings height =140px>






aspx.cs文件中的




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

返回表格;

}



i附加数据到raddropdowntree

protected void Page_Load(object sender,EventArgs e)

{

RadDocument.DataSource = GetData();

RadDocument.DataBind();

RadDocument.ExpandAllDropDownNodes();

}





但是当我运行应用程序时,它会单独显示控件并选择选择文档文本。当我点击它时它不会下降。请帮助我。

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.

推荐答案

这篇关于Raddropdownt在运行时没有使用c#在asp.net web app中下降的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 11:30