I have created a datagridview with 3 columns as below :
- SR no
- tasks
- status(checkbox column)
I have to add 11 rows whose values I want to hardcode.
like sr no 1 to 11 and specific texts for tasks.
checkbox column should be initially all set to false.
what is the best way of doing it?
please help.
When working with a
DataGridView, I usually prefer to define the content using databinding. A simple way is to create a class to represent your records, create a list of objects of this class, and assign it to theDataSourceproperty of the DGV :In the designer, don’t forget to map each column to a property of the
SRclass (setDataPropertyNameto the name of the property)