NetAdvantage UltraWinTree 绑定(Binding)到类(class)
来源:互联网 发布:java lucene 编辑:程序博客网 时间:2024/06/11 05:07
NetAdvantage UltraWinTree 绑定(Binding)到类(class),非Datatable数据集成,C#中叫做POCO,领域对象,
UltraWinTree 层次树,表格树,Outlook展示
解决:Re: how to bind WinTree from instance Class
public class ProductBomTree:Model.ProductBom { //必须是第一个属性 public string Part_Name { get; set; } public string Part_No { get; set; } public List<ProductBomTree> Childrens { get; set; } }
private void button4_Click(object sender, EventArgs e) { this.ultraTree1.Override.ShowExpansionIndicator = ShowExpansionIndicator.CheckOnDisplay; this.ultraTree1.ViewStyle = ViewStyle.OutlookExpress; var d = new ProductBomTree { Part_Name="备注1", Bom_ID = Guid.NewGuid(), Part_ID = Guid.NewGuid(), Amount = 10, Childrens = new List<ProductBomTree>(){ new ProductBomTree(){ Part_Name="OK1111", Bom_ID = Guid.NewGuid(), Part_ID = Guid.NewGuid(), Amount = 3 } }}; d.Childrens.Add(new ProductBomTree() {Part_Name="OK222", Bom_ID = Guid.NewGuid(), Part_ID = Guid.NewGuid(), Amount = 1 }); var d2 = new ProductBomTree { Part_Name = "备注2", Bom_ID = Guid.NewGuid(), Part_ID = Guid.NewGuid(), Amount = 10, Childrens = new List<ProductBomTree>() { new ProductBomTree() { Bom_ID = Guid.NewGuid(), Part_ID = Guid.NewGuid(), Amount = 3 } } }; d2.Childrens.Add(new ProductBomTree() { Bom_ID = Guid.NewGuid(), Part_ID = Guid.NewGuid(), Amount = 2 }); var d3 = new ProductBomTree { Part_Name = "备注3", Bom_ID = Guid.NewGuid(), Part_ID = Guid.NewGuid(), Amount = 10, Childrens = new List<ProductBomTree>() { new ProductBomTree() { Bom_ID = Guid.NewGuid(), Part_ID = Guid.NewGuid(), Amount = 3 } } }; d3.Childrens.Add(new ProductBomTree() { Bom_ID = Guid.NewGuid(), Part_ID = Guid.NewGuid(), Amount = 3 }); var d4 = new ProductBomTree { Part_Name = "备注4", Bom_ID = Guid.NewGuid(), Part_ID = Guid.NewGuid(), Amount = 10, Childrens = null }; var ds = new List<ProductBomTree>() { d, d2, d3,d4 }; ultraTree1.DataSource = ds;}运行效果:
- NetAdvantage UltraWinTree 绑定(Binding)到类(class)
- 绑定自定义类到Runtime(Lua-binding)
- 绑定自定义类到Runtime(Lua-binding)
- 绑定自定义类到Runtime(Lua-binding)
- 绑定自定义类到Runtime(Lua-binding)
- cocos2d-x Lua绑定C++ 自定义类到Runtime(Lua-binding)
- cocos2dx-lua lua-binding只绑定函数,不绑定类
- NetAdvantage
- WCF绑定(Binding)
- Silverlight 数据绑定(Binding)
- Silverlight 数据绑定(Binding)
- Binding数据绑定
- Binding 绑定元素
- WCF 绑定(Binding)
- 数据绑定(Binding)
- 使用binding绑定自定义类 自动更新 set属性加OnPropertyChanged
- #431 – 绑定控件的宽度到高度(Binding a Control’s Width to Its Height)
- 静态绑定(static-binding) 动态绑定(dynamic-binding)
- Xcode 4.x 破解及真机调试
- 很早之前想做的一个技术点掌握的分析图表
- spring JDBC总结
- oracle 作业题总结
- TabHost两种实现方法
- NetAdvantage UltraWinTree 绑定(Binding)到类(class)
- 自己写的代码,备忘
- Oracle分页实现
- 深入了解php之opcode(一)
- java.lang.SecurityException: Sending SMS message: User 10034 does not have android.permission
- 第4周任务
- Hadoop各Release关系
- java学习笔记(一)
- Tomcat 404 ie 显示友好http错误信息页面