0
我在DevExpress XtraGrid控件中檢查了一個問題。Dev Express XtraGrid複選框
我在代碼中創建了未綁定的列(不是通過嚮導),並且該複選框無法通過鼠標進行檢查。
這裏是我的代碼:
Private Sub DataViewFrm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim data As New DataTable
data=getDataTable("select....")
gridViewer.DataSource = data
Dim Tick As New RepositoryItemCheckEdit()
gridViewer.Refresh()
Dim unbColumn As GridColumn = gridvwViewer.Columns.AddField("Coba")
unbColumn.VisibleIndex = gridvwViewer.Columns.Count
unbColumn.UnboundType = DevExpress.Data.UnboundColumnType.Boolean
unbColumn.OptionsColumn.AllowEdit = True
unbColumn.OptionsColumn.ReadOnly = False
gridvwViewer.Columns(8).ColumnEdit = Tick
End Sub
下面是結果: