无法在 windows ce 6 应用程序的数据网格的 winform 中为 DataGridBoolColumn 创建对象

Cannot create object for DataGridBoolColumn in winform for datagrid in windows ce 6 app

我正在尝试创建 DataGridBoolColumn 的对象。但它不在任何命名空间中。下面是我的简单代码。

The type or namespace name 'DataGridBoolColumn' could not be found (are you missing a using directive or an assembly reference?) C:\Csharp apps\PickerPayScreener\PickerPayScreener\Form1.cs 235 21 PickerPayScreener

我在 DataGridBoolColumn 下看到一条红色波浪线。

DataGridBoolColumn cs1 = new DataGridBoolColumn();
cs1.NullValue = false;
cs1.TrueValue = true;
cs1.FalseValue = false;
cs1.MappingName = "checked";
cs1.ReadOnly = false;
gdPickerDetail.TableStyles[0].GridColumnStyles.Add(cs1);

尝试将以下代码放在源代码 (.cs) 文件的开头

 using System.Windows.Forms;

还要确保您的项目引用程序集 System.Windows.Forms.dll

DataGridBoolColumn 在 .NET Compact Framework 中不受支持(在 Windows CE 中使用)。请参阅 MSDN 页面:https://msdn.microsoft.com/en-us/library/ms172499(v=vs.90).aspx

改用System.Windows.Forms.DataGridViewCheckBoxColumn