如何在不使用数据集中相关表的情况下在 ultragrid 中获取子带?

发布于 2024-07-08 02:47:43 字数 159 浏览 13 评论 0原文

我正在使用 linq 来拉回一个对象(即客户),该对象可能具有其他对象的集合(customer.orders)。 如果我可以将此客户列表传递到 Ultragrid 并在数据绑定上显示客户及其订单的分层视图,那就太好了。 当我尝试这样做时,我就得到了客户。 有人知道如何让它与非数据集对象一起使用吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

扮仙女 2024-07-15 02:47:43

弄清楚了。 IList 集合可以工作,并且如果域对象是 IList,则会为域对象的属性创建带区。 只需确保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.

£冰雨忧蓝° 2024-07-15 02:47:43

我尝试了以下方法,但没有成功:

DisplayLayout.ViewStyle = ViewStyle.MultiBand

我从 读取这篇博客指出它必须是 List 而不是 IList 才能工作,而且确实如此。

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.

偏爱你一生 2024-07-15 02:47:43

我们使用自己的自定义网格数据源,因此我们首先创建带区结构,然后按需初始化数据,处理事件
初始化数据行
初始化行集合
CellDataRequested

我们使用标签来浏览结构。

We work with our own custom datasource for grid, so we first create a structure of bands and then we initialize data OnDemand, handling events
InitializeDataRow
InitializeRowsCollection
CellDataRequested

We use Tags to navigate through the structure.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文