我想在DevExpress的xtraGrid列添加CheckBox,为此我该怎么办
答案 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