0

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?

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by vinayphadke
0

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. :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.