Current filter:
                                You should refresh the page.
                                Support Center
                                  • 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")
                                        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
                                        Col8.ColumnEdit = riCheckEdit


                                I forgot to add that after I set the repository item nullstyle the checkbox now appears but always shows unchecked. It is not binding the datatable value correctly. The column values should be set to TRUE. When I check the box it changes to the unchecked state when I move to a new row.



                                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.

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners