RadGrid、明细表和分组
假设我有一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以查看此作为示例的三级层次结构。每个 GridDataItem 都有一个“CanExpand”属性。您应该能够使用一些自定义逻辑来确定包是否是套件,然后将该行的 CanExpand 设置为 true,否则为 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:
I would first try the ItemCreated event for the custom logic.
This may also help: Hiding expand/collapse images when no records
这可能对你有帮助!
This may help you!