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
2 Days
Discussion Span
1 Year Ago
Last Updated
3
Views
Question Answered
Related Article:Clear Checkbox selection on gridview event
is a ASP.NET discussion thread by vijeevvv that has 1 reply, was last updated 1 year ago and has been tagged with the keywords: checkbox, gridview.
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...