如何在同一个窗体上显示两个不同数据的网格
我有一个带有两个网格的表格。我有一个包含行的表,其中每行的状态为“是”或“否”。我想在顶部网格中显示所有“是”,在底部网格中显示“否”。
如果我想显示 SalesTable 标头记录,则会出现类似的情况。顶部网格仅包含状态为“已交付”的网格,底部网格仅包含状态为“已开票”的网格。
我怎样才能做到这一点?
通过添加相同表类型的另一个数据源,我已经接近了。我添加了一个 QueryBuildRange 来过滤记录,但遇到两个问题:
- 当我单击顶部/底部的一行时,它会同时移动两条行线(突出显示的内容是
- 它希望显示与顶部行数相同的行)由于某种原因,底部行??如果我有 3 个已交付的销售订单和 5 个已开具发票的销售订单,则会在顶部显示 3 个,在底部显示 3 个。
I have a form with two grids. I have one table with rows where each row has a status of Yes or No. I'd like to display all the yes's in the top and the no's in the bottom grid.
A similar scenario would be if I wanted to show SalesTable header records. The top grid would be only those with a status of Delivered, and the bottom grid those with a status of Invoiced.
How can I accomplish this?
I've gotten close by adding another datasource of the same table type. I add a QueryBuildRange to filter the records but I get two issues:
- When I click on a row in the top/bottom, it moves both row lines at the same time (the highlighting thing
- It wants to show an equal number of top rows as bottom rows for some reason?? If I have 3 delivered sales orders, and 5 invoiced sales orders, it will show 3 in the top and 3 in the bottom.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像网格控件这样的接缝由相同的数据源控制。
检查网格控件的属性:确保它们没有设置为相同的数据源!
无论如何,了解 Form 的结构以及 QueryBuildRange 的添加方式将会很有帮助。
我创建了一个非常简单的表单,它工作正常:
这个工作正常(尽管具有相同的内容)。然后我
,它仍然有效。
Seams like the Grid-controls are being controlled by the same DataSource.
Check the properties of the Grid-control: make sure they are not set to the same DataSource!
Anyway, it would be helpful to know how the Form is structured and how the QueryBuildRange was added.
I created a very simple Form and it worked correctly:
this one worked correctly (despite having the same contents. Then I
and it still worked.