首页 > 解决方案 > WinForms dev express bind true/false column with a checkbox

问题描述

I'm working on a Windows Forms project and I have some data in a XtraGrid.GridControl with these columns:

ID, Description, To Process

I'm loading these data from database, and the column To Process contains a boolean field.

I would like to have instead of the current 1 and 0 values a checkbox, that will be checked if the value is 1 and unchecked if the value is 0.

How can I achieve this with Dev Express 16?


This is what I did so far:

As now, I have my table populated but with 1 and 0 values in the column To Process.

标签: c#winformsdevexpress

解决方案


Assign a RepositoryItemCheckEdit to your To Process column's ColumnEdit property and set its ValueChecked and ValueUnchecked properties if necessary. More information here.


推荐阅读