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

Unbound Check Box in a DataBoundGrid

I am using the Syncfusion Data Bound Grid to display and edit data that has a boolean data field. (Selected / Not Selected) When I use the GridBoundColumns Property Editor the CellType Property has a drop down list that is not populated with Cell Types, so I typed in CheckBox. This made the Column display as a check box, but I can not seem to get the data from the dataset to display in the check box. The True values are not displaying as checked. I also can not seem to get the checkbox to change state when a mouse click is generated. The rowheader does change to display that the record has changed, but the check box does not visually show the check mark. I have set the mappingname property for the column, and when I set the Cell Type to Text the text True does appear. So it appears that the data is mapped to the column correctly. Is there an additional property that needs to be set? I looked for a databound sample that had a checkbox, but I did not see one. Is there a sample that I missed? Thanks in advance. Anthony Mansfield

1 Reply

CB Clay Burch Syncfusion Team August 22, 2002 05:38 PM

You also need to set a style member called CheckBoxOptions so it matches the values that your database is sending over as true and false. You said that if you change the CellType to TextBox, you see the text True. So, it sounds like True is your true value and probably False is your false value. So, under the StyleInfo property for you checkbox boundcolumn, find the CheckBoxOptions and change the default 1 and 0 to True and False to see if that takes care of this problem. (If just True by itself does not work properly, you might also try "True" with quotes to see if that is what is being passed in).

Loader.
Live Chat Icon For mobile
Up arrow icon