用个for嘛
i=rows.count
rows[i].cells[0].ToString()

解决方案 »

  1.   

    还有一个问题:在cell里编辑后按enter不是就在datagrid里确认了value的修改吗。问题是如何判断是哪个被修改了?修改数据源的oledbdataadapter.update()写在什么事件里?我实验过了写在keydown里好象不对。如果无法判断如何编辑,如何写sql是个很麻烦的问题啊!!555555
      

  2.   

    用个for嘛
    i=rows.count
    rows[i].cells[0].ToString()
    -------------------------------------
    什么意思??
      

  3.   

    我的做法是在第一列加一个CheckBox,如果有改变,则ChechBox自动为true,在循环时只要判断
     if ( (bool)r[0] ) 就可以了。
      

  4.   

    我的做法是在第一列加一个CheckBox,如果有改变,则ChechBox自动为true
    -----------------------------------------------
    如何判断呢?在什么事件里判断进行了编辑?
      

  5.   

    for (int i = 0; i < DataGrid.Rows.Count; i++)
            {
                string 变量=DataGrid.Rows[i].Cells[i].ToString();
            }