private void GridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
GridView1.CurrentCell.Value="保存";
}
当前ColumnType 为 DataGridViewButtonColumn, Text值不能修改
但ColumnType 为 DataGridViewTextBoxColumn, Text值可以修改

解决方案 »

  1.   

    GridView1.CurrentCell 转换成 DataGridViewButtonCell 
      

  2.   

    应该是使用((button)GridView1.Rows[i].FindControl("控件名")).Text
    来获取控件,更改值
      

  3.   

    不对,你说反了吧。Button可以直接修改厄。
      

  4.   

    DataGridViewButtonCell ButtonCell = (DataGridViewButtonCell)GridView1.CurrentCell
    ButtonCell.value="" 
    也不行
      

  5.   

    我怎么就可以呢?
     private void Form3_Load(object sender, EventArgs e)
     {
         var data = new DataTable();
         data.Columns.Add("a");
         data.Columns.Add("b");
         data.Rows.Add("a1", "b1");
         dataGridView1.DataSource = data;
     } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
     {
         dataGridView1.CurrentCell.Value = "save";
     }
      

  6.   

    前辈,你的列类型是 DataGridViewTextBoxColumn 吧;
    DataGridViewButtonColumn不行啊
      

  7.   

    是 DataGridViewButtonColumn 的 ,你把 DataGridViewButtonColumn 绑定到"b"列上。