Queries |
Solutions | |
I manually added a checkbox column to my datagrid, then loaded the rest from a datatable.
When I check on a checkbox, it doesn't check. I also need to be able to check multiple rows.
I added the code I used to add the checkbox column to an project you gave me for my last question. |
We have checked the provided sample from our end. In this sample CheckBoxColumn does not define with underline Boolean type property. So, check or uncheck the checkbox in SfDataGrid does not changes the check and unchecked state. You can resolve the reported issue by define the Boolean type property in model class. Please refer the below code snippet,
For more information, please refer the below UG link, UG Link: https://help.syncfusion.com/windowsforms/datagrid/gettingstarted#creating-data-for-sample-application SfDataGrid allows you to select or deselect individual rows through CheckBox using GridCheckBoxSelectorColumn, which is not bound with data object from underlying data source, and it can be added like normal columns. For more information, please refer the below UG link, UG Link: https://help.syncfusion.com/windowsforms/datagrid/columntypes#gridcheckboxselectorcolumn | |
Could you also show me how to map columns from the datasource manually? |
Based on provided information we suspect that you need to manually generate the column in SfDataGrid. Please refer the below code snippet,
For more information, please refer the below UG link, UG Link: https://help.syncfusion.com/windowsforms/datagrid/columns#manually-defining-columns |