有没有办法在树模式下使用 telerik RadGrid 跳过一个级别?
情况如下:我有一个两级树,正在分层 RadGrid 中显示:
-Category 1
--Cat 1 Section 1
--Cat 1 Section 2
-Category 2
--Cat 2 Section 1
--Cat 2 Section 2
--Cat 2 Section 3
-Category 3
--Cat 3 Section 1
等等。但我刚刚收到一个新的要求,即类别本身实际上是另一种实体的子级:
-Bucket 1
--Bucket 1 Category tree...
-Bucket 2
--Bucket 2 Category tree...
我无法弄清楚如何在 RadGrid 中表达的要求部分是这样的(实际上这是从整个丑陋的简化而来的)真相):如果数据集中有多个桶,他们希望树的根级别是桶,但如果只有一个桶,他们不会 希望根是单个存储桶节点;相反,他们只是希望根级别成为该单独存储桶中的类别。
我的问题是,我没有找到一种方法来从控件中删除该存储桶级别并将下一个级别提升到根。有什么办法可以做到这一点吗?提前致谢。
Here's the situation: I've got a two level tree that I'm displaying in a hierarchical RadGrid:
-Category 1
--Cat 1 Section 1
--Cat 1 Section 2
-Category 2
--Cat 2 Section 1
--Cat 2 Section 2
--Cat 2 Section 3
-Category 3
--Cat 3 Section 1
and so on. But I was just handed a new requirement that the categories themselves are actually children of another kind of entity:
-Bucket 1
--Bucket 1 Category tree...
-Bucket 2
--Bucket 2 Category tree...
The part of the requirement that I can't figure out how to express in the RadGrid is this (actually this is simplified from the whole ugly truth): if there are multiple buckets in the data set, they want the root level of the tree to be the buckets, but if there is only one bucket, they do not want the root to be that single bucket node; rather they just want the root level to be the categories in that lone bucket.
My problem is that I'm not seeing a way to remove that bucket level from the control and promote the next level to the root. Is there any way to do this? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这一切都取决于您创建的绑定。我认为没有其他方法可以做到这一点。
然后通过 GridDetailTableDataBindEvent 进行操作。
It will all come down to the binding that you create. I don't think there is another way to do it.
Then work your way thru the GridDetailTableDataBindEvent.