如何在datagridview中加入按钮列
Form中有个dgView(DataGridView)
请问如何在dgView中添加一个按钮列,通过按钮列中的按钮来触发事件  
------解决方案--------------------直接在DataGridView的编辑列里.把需要按钮的列的ColumnType改成DataGridView就行了```
------解决方案--------------------生成模版列在command事件里随便加。
------解决方案--------------------列的columnEdit属性选择按钮,编写该按钮点击事件就可以了
------解决方案--------------------            DataGridViewButtonColumn btn = new DataGridViewButtonColumn();
           btn.name="colbtn";
           btn.HeaderText= "查询明细";
           btn.DefaultCellStyle.NullValue = "查询明细";
           dgView.columns.add(btn);
  //占击按钮操作,也可以用EditingControlShow....
       private void dGV1_CellContentClick(object sender, DataGridViewCellEventArgs e)
       {
           if (dGV1.Columns[e.ColumnIndex].Name == "colbtn")
           {
                //占击按钮操作
           }
       }
------解决方案--------------------在datagridview的Columns属性可以加按钮列
然后触发事件是
       private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
       {
           if((string) dataGridView1.CurrentCell.Value == "button")
           {
               //todo
           }
       }