DataGridViewTextBoxColumn 这个有谁用过,如何判断这个是TRUE或是false

xiaomh2008 2009-08-24 10:02:44
DataGridViewTextBoxColumn 这个有谁用过,如何判断这个是TRUE或是false,然后我想取true和false这个的值???谢谢了
...全文
87 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Lizzy莲 2009-08-25
  • 打赏
  • 举报
回复
复选框应该是 DataGridViewCheckBoxColumn

DataGridViewCheckBoxCell checkCell = (DataGridViewCheckBoxCell)dataGridView1.Rows["Row1"].Cells["Column1"];

bool isChecked = (bool)checkCell.EditedFormattedValue
yuyingying1986 2009-08-24
  • 打赏
  • 举报
回复
DataGridViewCheckBoxColumn 吧 ?


if (dataGridView1["Column1", 0].Value != null) //为null是没有选中过
return Convert.ToBoolean(dataGridView1["Column1", 0].Value);
else
return false;


dataGridView1是DataGridView
Column1是第一列的name
xiaomh2008 2009-08-24
  • 打赏
  • 举报
回复
这是DataGridView里面的一种类型,把这一列修改成DataGridViewTextBoxColumn 这个类型,这一列都是复选框了
yuyingying1986 2009-08-24
  • 打赏
  • 举报
回复
不是很明白楼主的意思

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧