Here's the code that used to define the grid checkbox column
Dim Col8 As GridColumn = grdViewFine.Columns.AddField("OKtoPost")
With Col8
.OptionsColumn.ReadOnly = False
.Width = 75
.Caption = "OK to" & vbCrLf & "Post"
.VisibleIndex = grdViewFine.Columns.Count
.OptionsColumn.AllowEdit = True
.DisplayFormat.FormatType = DevExpress.Utils.FormatType.None
.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center
End With
Dim riCheckEdit As RepositoryItemCheckEdit = New RepositoryItemCheckEdit
riCheckEdit.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.Standard
riCheckEdit.ValueChecked = True
riCheckEdit.ValueUnchecked = False
riCheckEdit.NullStyle = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked
grdFine.RepositoryItems.Add(riCheckEdit)
Col8.ColumnEdit = riCheckEdit
Hello,
Thank you for the report. However, I'm not sure how to recreate this problem. Please review my sample. It seems everything works fine for me if I use your code snippet.
Thank you, Marina
Thanks Marina,
I looked at your example and noted the command "gridview.columns.clear" just prior to assigned the datasource to the grid. I didn't have that nor did I include those lines in what I sent you. With that command the boolean column works as expected; without it it does not.
Just another subtlety.
Thanks again.
Eric
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+