求一个使用tabletree4j+ ajax异步加载的源代码例子,我邮箱846527149@qq.com,望各位大神指点一下!
using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using Telerik.Web.UI; using System.Collections.Generic; using System.Web.UI.WebControls; namespace Telerik.TreeListExamplesCSharp.FirstLook { public partial class DefaultCS : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { RadTreeList1.ExpandedIndexes.Add(new TreeListHierarchyIndex { LevelIndex = 0, NestedLevel = 0 }); RadTreeList1.ExpandedIndexes.Add(new TreeListHierarchyIndex { LevelIndex = 1, NestedLevel = 0 }); RadTreeList1.ExpandedIndexes.Add(new TreeListHierarchyIndex { LevelIndex = 2, NestedLevel = 0 }); } } protected void RadTreeList1_NeedDataSource(object sender, TreeListNeedDataSourceEventArgs e) { RadTreeList1.DataSource = MyData.GetData(); } protected void CheckBox1_CheckedChanged(object sender, EventArgs e) { RadTreeList1.ShowOuterBorders = CheckBox1.Checked; } protected void CheckBox2_CheckedChanged(object sender, EventArgs e) { RadTreeList1.ShowTreeLines = CheckBox2.Checked; } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { switch (DropDownList1.SelectedValue) { case "Both": RadTreeList1.GridLines = TreeListGridLines.Both; break; case "Horizontal": RadTreeList1.GridLines = TreeListGridLines.Horizontal; break; case "None": RadTreeList1.GridLines = TreeListGridLines.None; break; case "Vertical": RadTreeList1.GridLines = TreeListGridLines.Vertical; break; } } protected void CheckBox3_CheckedChanged(object sender, EventArgs e) { RadTreeList1.AllowPaging = CheckBox3.Checked; RadTreeList1.Rebind(); } protected void CheckBox4_CheckedChanged(object sender, EventArgs e) { RadTreeList1.AllowSorting = CheckBox4.Checked; RadTreeList1.SortExpressions.Clear(); RadTreeList1.Rebind(); } protected void CheckBox5_CheckedChanged(object sender, EventArgs e) { RadTreeList1.ClientSettings.Selecting.AllowItemSelection = CheckBox5.Checked; RadTreeList1.ClearSelectedItems(); } protected void CheckBox6_CheckedChanged(object sender, EventArgs e) { RadTreeList1.AllowMultiItemSelection = CheckBox6.Checked; } } public class MyData { public static List<MyItem> GetData() { List<MyItem> list = new List<MyItem>(); list.Add(new MyItem("A", "Appetizers", "", null, true, "")); list.Add(new MyItem("B", "Beverages", "", null, true, "")); list.Add(new MyItem("C", "Cheese", "", null, false, "")); list.Add(new MyItem("A1", "Southwestern Twisted Chips", "150 gr.", 6.79m, false, "A")); list.Add(new MyItem("A2", "Top Shelf Combo Appetizer", "300 gr.", 9.49m, true, "A")); list.Add(new MyItem("B1", "Sangria", "90 ml.", 6.49m, true, "B")); list.Add(new MyItem("B2", "Margarita", "60 ml.", 7.39m, false, "B")); list.Add(new MyItem("B3", "Red Cherry Boost", "200 ml.", 6.99m, false, "B")); list.Add(new MyItem("B4", "Mojito", "180 ml.", 7.59m, true, "B")); list.Add(new MyItem("C1", "Blue Cheese and Hazelnut Shortbread", "220 gr.", 10.69m, false, "C")); list.Add(new MyItem("C2", "Avocado Feta Salsa", "240 gr.", 7.19m, false, "C")); return list; } } public class MyItem { public string ID { get; set; } public string ProductName { get; set; } public string Quantity { get; set; } public decimal? Price { get; set; } public bool InStock { get; set; } public string ParentID { get; set; } public MyItem(string id, string productName, string quantity, decimal? price, bool inStock, string parentID) { ID = id; ProductName = productName; Quantity = quantity; Price = price; InStock = inStock; ParentID = parentID; } } }
这个是花钱的啊,有没有免费的?
@SmallMonkey: 破解,这是中国,可以做到的。
@SmallMonkey:
http://blog.csdn.net/BlueSuperMan/article/details/3504063这个博客下面有tabletree+ ajax的源码下载。
@荒野的呼唤: 那个看不懂唉,有简单点的例子吗?
@SmallMonkey: http://blog.csdn.net/BlueSuperMan/article/details/3504063这个博客下面有tabletree+ ajax的源码下载。
已经很简单了。把你不需要用的先删除掉,就简单了。
官网不是有异步加载的例子吗?
没有找到啊
@SmallMonkey: 在demo/demo_simple_girdtree.html,你看看他“Group B”的写法。另外有个loadingAddNodes方法