Hi,
I am using the 'DataGridViewCheckBoxColumn' class to show the checkbox in each row of gridview. The checkboxes require 0 & 1 values to show the checkboxes checked and unchecked. The select query which builds the datasource for Gridview shows the 0 & 1 values being fetched from database.
Now my problem is- the checkboxes always remain unchecked irrespective of values assigned 0 or 1. I checked gridview properites but didnt get the solution. Can anyone guide me?

Paste the code here.

Hi,

I wanted put the code here... but as Network was down.. I couldn't post anything... But after scratching head for 8 hrs , it got resolved.

The resolution was: The DataPropertyName Property of DatagridviewChekbox column was not getting set properly. the actual column to which the checkboxes are going to be bound, was "Column1" and the DataPropertyName was getting set to "Column1 ". (the space was getting added). So just applied trim function and the problem got resolved...

Thanks. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.