1
Answer

DataGridView and CheckboxColumn

Ask a question
Kevin 0

Kevin 0

14y
4.9k
1
Hi,

first a short introduction to my problem.
I would like to display certain data in GridViews. The issue is, that the data comes from some rather oddly structured files from another application.
What I've done is wrote the classes and methods and now I can read in the data into DataTables.

In the Gridview a user should no be able to mark a record so I tried adding a unbound Column using the designer but I'm constantly getting an

System.FormatException: Value " cannot be converted to type 'Boolean'

error when startign the application.

I then edited the "file reader class" and just added a new column to the DataTable with value = false for all rows.
This partially fixes the problem but when you scroll all the way down the last row is for entering a new row. and as soon as it pop in view the System.FormatException is displayed again.

-> error seems to be displayed, when the value for the checkbox is null.

How can I prevent this error?


Answers (1)