<ext:DropDownList Label="指定类别" AutoPostBack="true" Required="true" EnableSimulateTree="true"
ShowRedStar="true" runat="server" ID="ddlBox"
OnSelectedIndexChanged="ddlBox_SelectedChange" >
</ext:DropDownList>
//这个存储过程使用的是层级结构
DataTable dt = Govaze.SQLServerDAL.Factory.getDataXmlDAL().ProcDataTable("<root><Type>simulate_tree2</Type><AID>" + TreeID.Text + "</AID></root>", "DataXmlProject");
ddlBox.DataTextField = "Name";
ddlBox.DataValueField = "Id";
ddlBox.DataSimulateTreeLevelField = "Level";
ddlBox.DataEnableSelectField = "EnableSelect";
ddlBox.EnableSimulateTree = dt.Rows.Count <= 1 ? false : true;
ddlBox.DataSource = dt;
ddlBox.DataBind();
ddlBox.SelectedValue = TreeID.Text;
原文:https://www.cnblogs.com/sanshengshitouhua/p/14460869.html