如何在不使用数据集中的相关表的情况下获得Ultragrid中的子带? [英] How do you get child bands in ultragrid without using related tables in a dataset?
问题描述
我正在使用linq来拉回可能包含其他对象(customer.orders)集合的对象(即客户).如果可以将客户列表传递给超网格,并在databind上显示客户和他们的订单的层次结构视图,那将是很好的.当我尝试这种方法时,我只会吸引客户.有谁知道如何使它与非数据集对象一起使用?
I'm using linq to pull back an object (i.e. customer) that might have a collection of other objects(customer.orders). I would be nice if I can pass this list of customers to the ultragrid and a hierarchical view of customers and thier orders displayed on databind. When I try this, I just get customers. Anyone know how to get this to work with non dataset objects?
推荐答案
弄清楚了. IList集合可以工作,并且会为您的域对象的属性创建带状区(如果它是IList<T>
).只需确保DisplayLayout.ViewStyle = ViewStyle.MultiBand
.
Figured it out. IList collection works and will create bands for properties of your domain object if it is an IList<T>
. Just make sure thatDisplayLayout.ViewStyle = ViewStyle.MultiBand
.
这篇关于如何在不使用数据集中的相关表的情况下获得Ultragrid中的子带?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!