为什么这两种树不能参照树菜单那样根据上一层PID生成,而是要更具level
List<JQueryFeature> myList = new List<JQueryFeature>(); myList.Add(new JQueryFeature("0", "jQuery", 0, false)); myList.Add(new JQueryFeature("1", "核心", 1, false)); myList.Add(new JQueryFeature("2", "选择符", 1, false)); myList.Add(new JQueryFeature("3", "基本选择符", 2, true)); myList.Add(new JQueryFeature("4", "内容选择符", 2, true)); myList.Add(new JQueryFeature("5", "属性选择符", 2, true)); myList.Add(new JQueryFeature("6", "筛选", 1, false)); myList.Add(new JQueryFeature("7", "过滤", 2, true)); myList.Add(new JQueryFeature("8", "查找", 2, true)); myList.Add(new JQueryFeature("9", "事件", 1, false)); myList.Add(new JQueryFeature("10", "页面载入", 2, true)); myList.Add(new JQueryFeature("11", "事件处理", 2, true)); myList.Add(new JQueryFeature("12", "事件委托", 2, true)); ddlBox.DataTextField = "Name"; ddlBox.DataValueField = "Id"; ddlBox.DataSimulateTreeLevelField = "Level"; ddlBox.DataEnableSelectField = "EnableSelect"; ddlBox.DataSource = myList; ddlBox.DataBind();
生成,如果是动态添加,后面插入的不是在后面了么。谢谢
|