Datagrid GridColumnStyles not showing checkbox

P

Paul Sampson

Hello,

I've added a TableStyle and two GridColumnStyles to my datagrid in design
mode, to allow setting the size of the columns. This works fine (even though
it's WAY too complicated for something so simple).

However, prior to this the second column was a checkbox, reflecting the
underlying MSSQL bit data type. After explicitly adding the GridColumnStyle
the textbox is replaced by "True/False". I can't work out how to keep the
checkbox, and I hope to avoid programatically creating all this rubbish just
to set column sizes.

Please help!

Paul
 
D

Dmitriy Lapshin [C# / .NET MVP]

Paul,

This is because your second column was created as DataGridTextBoxColumn
while it should have been created as DataGridBoolColumn. You could probably
change the column type in the appropriate collection designer, or just
re-create the column with the desired type.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top