I've added a bound checkbox column (via the repository item) to a grid. It is a boolean datatype. The checkbox appear in the grid but instead of a check (or not) it shows a small black square in the center of the checkbox. When I check it is shows the check as expected but then when I click another row it reverts back to the square. What is happening?
Here's the code that used to define the grid checkbox column
Dim Col8 As GridColumn = grdViewFine.Columns.AddField("OKtoPost")
.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
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
Col8.ColumnEdit = riCheckEdit
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
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.
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.