如何在DevExpress xtraGrid中添加CheckBox

时间:2010-02-12 07:11:49

标签: vb.net devexpress

我想在DevExpress的xtraGrid列添加CheckBox,为此我该怎么办

1 个答案:

答案 0 :(得分:2)

在网格设计器中创建一个新的编辑器存储库项目(CheckEdit)(在就地编辑器存储库下)并将其添加到列的ColumnEdit属性中(在列下)

编辑:以编程方式添加

Dim repstryItemCheckEdit As New RepositoryItemCheckEdit

GridControl.RepositoryItems.Add(repstryItemCheckEdit)

Dim chckEdtColumn As GridColumn = myGrid.Columns.AddField("Select")

With chckEdtColumn
  .VisibleIndex = myGrid.Columns.Count
End With
myGrid.Columns.Add(grsSalColumn)

myGrid.Columns("Select").ColumnEdit = repstryItemCheckEdit