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

Checkbox control

Hi, I am trying to add cell of type check box to my databound grid but i am facing some problems: 1. I had assosiated DataTable to grid. I am trying to change checkbox state by specifing true or false for checkbox column but there is no change in checkbox state. 2. I am not able to check or uncheck checkbox. Do i have to handle the click event and change the state of control in my code? Thanks -Rajiv

1 Reply

AD Administrator Syncfusion Team March 15, 2004 09:00 AM UTC

If your column in your DataTable is of type boolean, then you should not have to do anything to get things working. If your column is some other type, then you will have to set the GridBoundColumn.StyleInfo.CellType and CheckBoxOptions to make things work properly. Here is a sample that shows a bool datacolumn working initially when the grid is displayed. The grid also has a string column showing T''s and F''s, and an int column showing 1''s and 0''s. There is a button you can click that sets the CellType and CheckBoxOptions for these additional columns so they show as checkboxes. forum11733_668.zip

Live Chat Icon For mobile
Up arrow icon