Howdy,
I can i force datagridview, to show the checkbox for the boolean field true/false?
I’m trying:
grid.Columns(“p1”).ValueType = GetType(Boolean)
But nothing.
The field in MySQL is a enum() with true or false.
Hi Jorge
From your question I understood that you have a value that is not boolean, but you want to checkbox will show it checked and unchecked.
Independent from the database, it’s the datatable or object structure that you populate from database the important stuff.
In the sample proyect, I populate a datatable with diferente logical values in diferent datatpyes and used it how datasource for a datagrid with checkbox.
The checkbox take the int and string values how logical and show how checked and unchecked
Datagrid above with custom columns and ckeckbox columns linked with
Datagrid below without columns,
Code for populate DataTabe
I hope helped you
Regards
Paul
Please login first to submit.