Click here to Skip to main content
15,920,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, I am trying to figure out how to enable user checking or unchecking of an unbounded DataGridViewCheckboxColumn. I have multiple DataGridView objects. Each of which is bounded to their own individual DataView object. The table of all DataView objects is tied to a single DataTable. There are three columns in each of my DataGridView objects, but only two of them is retrieved from the DataTable with my checkbox column being the third unbounded one.

I Googled for similar problems, but it isn't working for me.

Property Enabled and Readonly for DataGridView are true and false, respectively. Property Readonly for DataGridViewCheckboxColumn is false. Property AllowEdit for DataView is set to true as well. What else am I missing or need to set to enable user checking or unchecking?
Posted
Updated 4-Dec-13 19:39pm
v3

1 solution

I found the problem to my issue. It was my MouseDown event at fault, because in the handler, I programmed it to perform a DoDragDrop(). Since DoDragDrop() is in process, the checking or unchecking of the checkbox is completely ignored.

In order to fix my issue, I have to use a Timer and add a MouseUp event handler to differentiate when to check or uncheck the box and when to drag and drop. Even though it isn't working as perfectly as I wanted with my current source code, it at least works. Now, onto my other problems...

Oh, thanks for those who tried to help me out.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900