Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you get child bands in ultragrid without using related tables in a dataset?

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?

like image 349
Bless Yahu Avatar asked Nov 05 '08 20:11

Bless Yahu


2 Answers

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.

like image 66
Bless Yahu Avatar answered Oct 01 '22 13:10

Bless Yahu


I've tried the following and it didn't work:

DisplayLayout.ViewStyle = ViewStyle.MultiBand

I read from this blog that it must be List and not IList in order to work, and it did.

like image 20
KTN Avatar answered Oct 01 '22 13:10

KTN