本站首页    管理页面    写新日志    退出


«September 2025»
123456
78910111213
14151617181920
21222324252627
282930


公告
================

注会练习软件
http://www.cpasoft.com.cn
我的注会软件官网

http://blog.163.com/abc7105@126/

 

 


哈哈,热爱快“过气”的DELPHI


我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:注册会计师(注会)练习软件
日志总数:398
评论数量:116
留言数量:27
访问次数:3268620
建立时间:2005年6月6日




[borland eco 技术]eco中expressionhandle使用嵌套在DATAGRID中显示数据(转外文)
软件技术

吕向阳 发表于 2008/2/28 21:08:24

Jan Nordén [ Borland ]    Here is some information on nestings that I wrote in another context. May be of use to someone. IMHO nestings are not all that useful in the winforms grid, but if there are third party treeviews or report generators that support them, they may come in handy. I will try to explain in informally, using how it is displayed in the default grid for illustration. To start of, the handles render the input list into a number of objects (shown as rows in a grid) with a number of properties (in most cases shown as columns in the grid") BTW the terminology for those properties in the .Net docs is very inconsistent, properties, columns, members. These objects are the object int he IList implemented by the handles (and alse returned by GetList() for historical reasons). The property/column/member:s are defined by the list also implementing ITypedList. Each such property/column/member can be either a single value, or a new list (possibly of a single element). If it is a single value it can be displayed in a column. If it is a list then in will be displayed in the Grid with a '+', which will fold out to a new (nested) set of rows. The Nesting property is used to define which properties/column/member:s the object in that sublist will have. Some of these may in turn be lists, each Nesting value essentially has the same data-rendering properties as the handle itself, AddDefaultColumns, AddDefaultNestings, Colums. A Column is defined as being a list by setting the Nested property to true. In this NestedName will specify which Nesting that defines the column for the objects in that list (which is usually and Eco class such as Person). If no name is given, the static type of the object in the list will be used as NestingName, and if the is no Nesting property for that Name, the default columns for that class will be used. SO, let us say that you are a person, and want to be able to show you parents, and your childen, and you want to show the full information for you parents, but only the name of your children. You would then add a column Parents with OCL expression 'self.Parents´, Nested=True, an no NestingName. This will lead to the default Person information being shown for the parents.. For the children, the expression would be "self.Children", Nested=true, and NestingName="PersonWithNameOnly" You would then add a nesting with the name "PersonWithNameOnly", AddDefaultColumns set to false, and a single column for name in the Columns collection. You can control the display of a particular nesting by adding a TableStyle to the grid with the TableName set to the name of the nesting. So, the value of a handle can be a pretty general tree, rather than just a rectangle.


阅读全文(2474) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.242 second(s), page refreshed 144777506 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号