c# - 如何使用 checkedit gridcontrol devexpress 选择行?

标签 c# checkbox devexpress gridcontrol

我的编码中有一个使用 C# 的 WinForm,我使用 gridcontrol Devexpress 2010 来显示数据联系人列表。

Here is my form

选择这些列表后,我从我选择的 gridcontrol 中获取值,然后按“确定”按钮获取它。我不知道代码。

任何人都可以推荐我。

最佳答案

首先,我建议您阅读知识库文章:How to select rows via an unbound checkbox column

Starting with version 13.2, the GridView in the XtraGrid control provides a built-in checkbox column for multiple row selection. See the following help topic to learn more: Multiple Row Selection via Built-In Check Column

In versions prior to 13.2, you can use the following two methods to manually implement a column for row selection:

  1. Add a Boolean data column to your data source that will maintain the selected state of rows.
  2. Use an unbound grid column.

The first approach is easy to implement, but adding "dummy" columns to data is often forbidden due to the constraints of an application's business logic.

The second approach is clarified below.

Create an array that will store the selected states of rows. Create an Unbound Column whose values will be in sync with the array. Write a CustomUnboundColumnData event handler to get/set unbound column values.
See perfect example of this here:
DevExpress XtraGrid Control with checkBoxEdit column

引用文献:
DevExpress Example:Multiple selection using checkbox (web style)

希望这有帮助..

关于c# - 如何使用 checkedit gridcontrol devexpress 选择行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29359705/

相关文章:

c# - 如何在 Sharepoint 多行字段中插入新行?

c++ - 我可以重置 wxWidgets 菜单中的复选框状态吗?

delphi - 从 cxLookAndFeelPaintersmanager 中删除皮肤

html - 在 VueJS 中取消选中带有标签的 CheckBox

android - 清除 View 的所有子项(RadioGroup)

c# - 具有动态列和行的 DevExpress WPF GridControl

asp.net - 从 ASPxGridView 中的自定义表单检索值

c# - 查询的结果类型既不是 EntityType 也不是具有实体元素类型的 CollectionType

c# - 未找到 OpenID 终结点

c# - C# 中自定义设置创建的问题