实现ITypedList的问题 [英] Problem with implementing ITypedList
问题描述
我试图允许绑定以键入复杂属性(例如,将网格绑定到collection< invoices> ;,并显示Invoice.Customer.Name中的属性).我认为可以通过在集合上实现ITypedList来实现,但是我只是不明白我需要传递哪种信息-我需要创建一些自定义属性描述符,还是?我希望此解决方案是通用的,而不是特定于客户类型.
我的问题是,我需要在GetItemProperties中返回什么,以便网格控件将能够绑定到子实体属性?
任何帮助表示赞赏.
谢谢,
Goran
I am trying to allow binding to type complex property (example is binding grid to collection<invoices>, and displaying properties from Invoice.Customer.Name). I think it can be done by implementing ITypedList on my collection, but I just don''t understand what kind of information do I need to pass - do I need to make some custom property descriptors, or? I want this solution to be generic, not specific to Customer type.
My question is what do I need to return in GetItemProperties, so grid control will be able to bind to child entity property?
Any help is appreciated.
Thanks,
Goran
推荐答案
您是否看过 ^ ]?
给出的示例看起来很完整.
Have you looked at the MSDN page for ITypedList[^]?
The example given looks pretty complete.
这篇关于实现ITypedList的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!