We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DataboundGrid with and without checkbox

Hi, I have two forms and one DataboundGrid in each one. Each grid is inside their group box. The grid''s properties are axactly the same. I copy and paste the code from one to another. Selecting the same DataTable to the DataSource of each grid, there is one difference. This table has boolean fields, and in the first DataBoundGrid the boolean field appears with the "False" ou "True" word, and in the second DataBoundGrid the boolean field appears with a check box !!! I would like to put them with the same values. Do you have any idea why this happens ? How can I put the table with the same apearance (with the checkbox is better) Thanks for your time, Jose Melo

1 Reply

AD Administrator Syncfusion Team April 6, 2004 09:24 PM UTC

Normally, the grid auto-senses a boolean datacolumn datatype, and sets the CellType = "CheckBox". I am not sure why it is not doing this in this case? Are you explicitly adding GridBoundColumns for the grid that does not show the checkbox? If so, you should set the grid.GridBoundColumns["myColumn"].StyleInfo.CellType = "CheckBox"; for that column (and also set GridBoundColumn.StyleInfo.CellValueType = typeof(bool); If you are not adding GridBoundColumns, then set these properties on the grid.Binder.InternalColumns instead of grid.GridBoundColumns.

Live Chat Icon For mobile
Up arrow icon