如题

解决方案 »

  1.   

    sorry
    应为:winform中的datagrid里如何假如添加按钮列???!!!
      

  2.   

    使用DataGridTableStyle ts
    然后定义一个Button btn
    定义一个DataGridColumn col
    将btn添加到col中
    再将col添加到ts中
    最后将ts添加到datagrid中
    OK
      

  3.   

    http://www.codeproject.com/cs/miscctrl/WindowsDataGridColumns.asp
      

  4.   

    使用DataGridTableStyle 是一定的至于
    Button btn 我还没有试过
    不过JoneG() 说的很有道理
      

  5.   

    需要自己定义DataGridTableStyle,你可以参考以下MSDN上面有相关的示例程序!
      

  6.   

    DataGridTableStyle ts=new DataGridTableStyle();
    ......
    DataGridTextBoxColumn aColumnTextColumn5=new DataGridTextBoxColumn();
    Button btn = new Button();   
    btn.Cursor=Cursors.Arrow;   
    btn.Text="删除";   
    btn.FlatStyle=System.Windows.Forms.FlatStyle.Standard;   
    btn.Click+=new EventHandler(btn_Click);   
    aColumnTextColumn5.TextBox.Controls.Add(btn);......
    ts.GridColumnStyles.Add(aColumnTextColumn5); //  '增加一种自定义的column风格
     
    dataGrid1.TableStyles.Add(ts);用上面的方法没显示,错在哪里??
      

  7.   

    aColumnTextColumn5.TextBox.visible = false;
    btn.BringToFront();
      

  8.   

    加了:
      aColumnTextColumn5.TextBox.visible = false;
    btn.BringToFront();
    还是不行,救急!!!!!!