RadGrid、明细表和分组

发布于 2024-08-16 10:53:21 字数 344 浏览 8 评论 0原文

假设我有一个 RadGrid,它显示客户订购的信息。主表视图是所有与客户相关的信息。展开后,详细信息表包含有关客户订购的商品的信息。

现在,棘手的部分是:我们出售称为“套件”的物品;本质上,它们是在一个 SKU 下订购的多个 SKU。想象一下节日礼品篮,客户会订购篮子,但实际上他们订购了 3 件商品;比如说一盒糖果、一件 T 恤和一张礼券。

我想要的是这些套件项目的第一个详细信息表下的另一个详细信息表视图。因此,您可以单击展开客户记录,然后在其下方,您会看到他们订购的商品。对于套件,您也可以对其进行扩展,并查看各个套件组件。但是,您不应该能够扩展不是套件的项目。

有人可以为我指出一个好的教程的方向,或者给我任何建议吗?

Say I have a RadGrid that shows info on what a customer has ordered. The master table view is all customer-related info. When expanded, the detail table contains info about the item the customer ordered.

Now, here's the tricky part: We sell items that we call a "Kit"; essentially they're multiple skus ordered under one sku. Think along the lines of a holiday gift basket, where the customer would order the basket, but they're actually ordering 3 items; say a box of candy, a t-shirt, and a gift certificate.

What i would like to have is another detail table view under the first detail table for these kit items. So, you could click to expand the customer record, and then underneath it, you'd see the items they ordered. In the case of a kit, you'd be able to expand that as well, and see the individual kit components. You shouldn't be able to expand an item that is not a kit however.

Can anybody out there point me in the direction of a good tutorial, or give me any suggestions?

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

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

发布评论

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

评论(2

如痴如狂 2024-08-23 10:53:21

您可以查看作为示例的三级层次结构。每个 GridDataItem 都有一个“CanExpand”属性。您应该能够使用一些自定义逻辑来确定包是否是套件,然后将该行的 CanExpand 设置为 true,否则为 false:

theGridDataItemItem.CanExpand = false;

我将首先尝试自定义逻辑的 ItemCreated 事件。

这也可能有帮助:没有记录时隐藏展开/折叠图像

You can look at this for an example of the three level hierarchy. Each GridDataItem has a property for "CanExpand". You should be able to use some custom logic to determine if the package was a kit, then set the CanExpand for that row to true, otherwise false:

theGridDataItemItem.CanExpand = false;

I would first try the ItemCreated event for the custom logic.

This may also help: Hiding expand/collapse images when no records

子栖 2024-08-23 10:53:21
grdDataItem["ExpandColumn"].Enabled = false;

这可能对你有帮助!

grdDataItem["ExpandColumn"].Enabled = false;

This may help you!

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