Ultragrid/Winforms 网格层次结构问题

发布于 2024-07-23 07:29:37 字数 530 浏览 11 评论 0原文

我需要使用 infragistics ultragrid 创建一个具有 3 个级别的 winforms 网格。

1 级有 2 列(固定)

---> 2 级有 3 列(固定)

--------> 级别 3 具有无限数量的列(基于级别 2 项目的类型动态)

示例

级别 1 项目 1 --> 3 列(固定)

1 级项目 1 --> 2 级第 1 项 --> 3 列(固定)

1 级项目 1 --> 2 级第 1 项 --> 3 级第 1 项 --> 3 列(动态)

级别 1 项目 1 --> 2 级第 2 项 --> 3 列(固定)

第 1 级项目 1 --> 2 级第 2 项 --> 3 级第 1 项 --> 6 列(动态)

如何在网格(特别是 Ultragrid)上实现这一点?

我现在头疼得很厉害

干杯

I need to create a winforms grid with 3 levels, using infragistics ultragrid.

Level 1 has 2 columns (Fixed)

---> Level 2 has 3 columns (Fixed)

--------> Level 3 has Infinite no of columns (Dynamic based on type of level 2 item)

example

Level 1 Item 1 --> 3 Columns (Fixed)

Level 1 Item 1 --> Level 2 item 1 --> 3 Columns (Fixed)

Level 1 Item 1 --> Level 2 item 1 --> Level 3 Item 1 --> 3 Columns (Dynamic)

Level 1 Item 1 --> Level 2 item 2 --> 3 Columns (Fixed)

Level 1 Item 1 --> Level 2 item 2 --> Level 3 Item 1 --> 6 Columns (Dynamic)

How can this be achieved on the grid, specifically Ultragrid?

I am having a massive headache right now

Cheers

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

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

发布评论

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

评论(1

岛歌少女 2024-07-30 07:29:37

UltraGrid 使用“带”的概念来存储分层数据。 您的 1 级是一个频段,您的 2 级是另一个频段。

这就是它变得棘手的地方:你的 3 级实际上是多个频段,具体取决于你有多少 2 级项目的动态类型。

如果您使用 DataSet/DataTable 作为数据源,则每个 DataTable 对应一个 Band,这很简单:

  • 1 个 DataTable for Level 1
  • 1 个 DataTable for Level 2(带有一个
    DataRelation 返回 DataTable 1)
  • N 个第 3 级的 DataTable,每个数据表都有
    它有自己的列,每个列都有一个
    DataRelation 返回到 DataTable 2

HTH。

UltraGrid uses the concept of "Bands" to store hierarchical data. Your Level 1 is one band, your Level 2 is another.

Here's where it gets tricky: your Level 3 is actually multiple bands depending on how many dynamic types you have of Level 2 items.

If you're using a DataSet/DataTable as the data source, each DataTable corresponds to a Band, this is simply:

  • 1 DataTable for Level 1
  • 1 DataTable for Level 2 (with a
    DataRelation back to DataTable 1)
  • N DataTables for Level 3, each with
    it's own columns, and each having a
    DataRelation back to DataTable 2

HTH.

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