如何在 Infragistic UltraGrid 中选择行或单元格?

发布于 2024-07-27 21:56:54 字数 57 浏览 16 评论 0原文

我需要在 Ultragrid 中选择一行、多行或一个单元格以从网格中复制。 如何才能做到这一点呢?

I need to select one row, multiple rows or a cell in Ultragrid to copy from the grid. How can this be accomplish?

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

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

发布评论

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

评论(4

故人的歌 2024-08-03 21:56:54

您的问题不是很具体,但如果您想获取或设置选定的行,您可以使用该行的 .Selected 属性。 您还可以使用:

_yourGrid.DisplayLayout.ActiveRow = whateverRowYouWantSelected

对于多项选择,您可以使用

_yourGrid.DisplayLayout.SelectedRows

Your question isn't very specific, but if you want to get or set the selected row, you can use the .Selected property on the row. You can also use:

_yourGrid.DisplayLayout.ActiveRow = whateverRowYouWantSelected

For multiple selection, you can use

_yourGrid.DisplayLayout.SelectedRows
太阳公公是暖光 2024-08-03 21:56:54

选择ultragrid设计器对话框的“功能选择器”并展开“选择”节点。
您应该能够按照您想要的方式配置单元格、行、列选择。 您还可以启用单行或多行选择。

select the "Feature Picker" of ultragrid designer dialog and expand the "Selection" node.
you should be able to configure the cell, row, column selection the way that you want. Also you can enable either single or multiple rows selection.

始于初秋 2024-08-03 21:56:54

关于如何通过列表对象的属性值过滤行的简单示例。

var rowToSelect = _texteViewModelsUltraGrid.Rows.FirstOrDefault(m => m.ListObject is TexteSetViewModel txtvm 
                                                                  && txtvm.Category == "MyCategory");
if (rowToSelect != null)
    _texteViewModelsUltraGrid.ActiveRow = rowToSelect;

在本例中,我们将选择第一行,其中基础列表对象(保存有关文本的信息的视图模型)属于 MyCategory 类别。

Simple example on how we can Filter a row by the value of a property of its list object.

var rowToSelect = _texteViewModelsUltraGrid.Rows.FirstOrDefault(m => m.ListObject is TexteSetViewModel txtvm 
                                                                  && txtvm.Category == "MyCategory");
if (rowToSelect != null)
    _texteViewModelsUltraGrid.ActiveRow = rowToSelect;

In this case we will select the first row where the underlying list object, a viewmodel holding information about a text, is of category MyCategory.

凤舞天涯 2024-08-03 21:56:54

这是一个真正开放式的问题(web/win 表单?)。 我能给你的最好建议是,如果你从网格的智能标签中打开 UltraWinGrid 设计器,然后选择“功能选择器”并展开“选择”节点,你应该能够以这种方式配置单元格、行、列选择你要的那个。

我希望这有帮助。

This is a really open ended question (web/win forms?). The best advice I can give you is if you open up the UltraWinGrid Designer from the grid's smart tag, then select the "Feature Picker" and expand the "Selection" node you should be able to configure the cell, row, column selection the way that you want.

I hope that helps.

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