DataGridView - Checkbox column not checking ?

0
0

If i simply add a checkbox column to a DataGridView (unbound) via the designer – at runtime shouldn’t the checkbox check/uncheck by itself ? or do I need to add code behind events ? From what I remember VWG used to work.

The DataGridview is set to ReadOnly=false :Enabled=true, EditMode=EditOnKeystrokeOrF2

checkbox column set to ReadOnly=false,

I’m using version 1.4.54

When I click on the checkbox cell at run time (with rows in the datagrid and I can see the checkboxes) nothing happens.

  • You must to post comments
0
0

Hi Edmond,

with WJ-8669, active in next Wisej build, we changed the behavior so that now DataGridViewColumn.ReadOnly is NOT serialized at design time when inherited from the parent DataGridView. Even though Wisej is now different from WinForms in that regard, we think it is more intuitive and helps to avoid problems like the one you have hit.

Best regards
Frank

  • You must to post comments
0
0

Sample Attached

Attachment
  • Luca (ITG)
    ReadOnly is set to true.
  • Luca (ITG)
    I see the problem… When setting ReadOnly = true in design mode on the parent DGV it serializes it for the child columns because when ReadOnly=false but the parent is true the column must return false as well – but it shouldn’t get serialized.
  • Luca (ITG)
    Works the same way in WinForms. Setting DGV.ReadOnly=true in the designer will serialize ReadOnly=true for all columns. Maybe we can improve it, but I’m not sure how yet.
  • edmond girardi
    I just checked the ReadOnly on the checkbox column and it was set to True – but I know i set it to false. Somehow i think it does not keep the setting every time -strange. I just set it to False again on the column and it now works.
  • You must to post comments
0
0

Hi Edmond,

I tried to reproduce with 1.4.54 and the latest build with a simple and more complex test cases but all worked fine regarding the CheckBox column.

Would it be possible to wrap up a small test case so we can spot the differences ? You could either post it here or send it to frankATiceteagroup.com please.

Thanks in advance !

Best regards
Frank

  • edmond girardi
    So you are able to just put a non-bound datagrid with a checkbox column, add rows to it via code and the check box toggles without any code ?
  • Frank (ITG)
    Hi Edmond, short answer: yes. Tested with 1.4.53, 1.4.54 and out latest internal build. Does it happen also on your side when the checkbox column is the only one or only in combination with other columns ? Is your DGV data bound ? I still think a sample could probably help. Best regards, Frank
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.