Show bit Column as a checkbox column in unbound Datagridview

Posted by Name.IsNullOrEmpty on Stack Overflow See other posts from Stack Overflow or by Name.IsNullOrEmpty
Published on 2010-05-14T07:03:13Z Indexed on 2010/05/14 7:04 UTC
Read the original article Hit count: 343

Dim Comp = From C In db.Table1 _
Select C.Completed, C.Taken, C.Namne

Datagridview1.DataSource = Comp

Am using the Entity Framework and Columns Completed and Taken are of bit Datatype. When the query results are displayed in the datagridview, these bit columns are returned as of ColumnType Textbox - so i get a Datagridview textbox column with true or false string values.

I want to display Completed and Taken as Checkbox columns (either ticked for True or un-ticked for false) but ofcourse i can't do this in EditColumn dialogue because the Datagridview is unbound.

how can i change this in code at runtime

© Stack Overflow or respective owner

Related posts about winforms

Related posts about visual-basic