做惯啦WEB程序,一下子做应用程序还不适应,现在手头没有分啦,就以10请大家多多帮助帮助..我想在应用程序form中的datagrid中加入一个checkbox怎么加啦,有没有好的方法,谢谢!

解决方案 »

  1.   

    many:
    http://blog.csdn.net/ChengKing/archive/2006/05/28/759064.aspx
      

  2.   

    DataColumn selflag= new DataColumn ();
    selflag.DataType = System.Type.typeof("System.Boolean");
    selflag.ColumnName ="selflag";
    selflag.AllowDBNull = false;
    selflag.DefaultValue = false;
    selflag.ReadOnly = false;
    dt_customer.Columns.Add(selflag);
      

  3.   

    是某一列加checkbox,还是一个单元格加
      

  4.   

    DataTable table=new DataTable();;
    table.TableName="teacher";
    DataColumn col1=new DataColumn("是否",typeof(bool));   //bool类型就显示为CheckBox
    table.Columns.Add(col1);
    dataGrid1.DataSource=table;
      

  5.   

    DataColumn selflag= new DataColumn ();
    selflag.DataType = System.Type.typeof("System.Boolean");
    selflag.ColumnName ="ColumnName";
    selflag.AllowDBNull = false;
    selflag.DefaultValue = false;
    selflag.ReadOnly = false;
    dt_customer.Columns.Add(selflag);