我从数据库读出来一列为bool类型,想显示在datagridview中的combobox上,如果读出来的是true 下拉列表显示 原件,为false显示 复印件, 求高手解答

解决方案 »

  1.   

                bool b=true;
                cb.Text = b ? "原件" : "复印件";
      

  2.   

    select case 字段 when 1 then '原件' else '复印件' end as 类型 from 表;
      

  3.   

    select case filetype when 1 then 'True' else 'False' end as 类型 from 表;
      

  4.   

    我 说的 可能有问题 我 查询的是表内所有的数据,其中一列是bool类型,并且bool类型中的值对应的是datagridview中的combobox,如果读出来的是true combobox显示原件,false显示复印件,并且combobox必须付初始值,也就是说在我实例化窗体时 dgv中的combobox内已经有数据了,分别是,原件/复印件,
      

  5.   

    grvresult_RowDataBound  事件里面写
      

  6.   

    我看成gridview  你去找他的事件