我的意思是这样的功能,在主表列表(dataGridView)里选中一条记录,然后作出修改,在没有保存此数据的情况下查看主表中另外的记录,然后系统做一个提示,是否保存本次修改...在这其中如何判断dataSet中数据是否被修改呢,并且在那里触发这种判断呢...

解决方案 »

  1.   

    一个是在 RowChanged 里面判断,一个是和数据库里面的比较。
      

  2.   

    dataset.HasChanges();获取一个值,该值指示Dataset是否有更改,包括新增的行、已删除的行、已修改的行
      

  3.   

    dataset.HasChanges()取一个值,然后在要退出修改时,根据值来提示就行了。
      

  4.   

    DataRow.RowState Property
    Gets the current state of the row
    DataRowState Enumeration
    Detached:The row has been created but is not part of any DataRowCollection. A DataRow is in this state immediately after it has been created and before it is added to a collection, or if it has been removed from a collection.Unchanged:The row has not changed since AcceptChanges was last called.Added:The row has been added to a DataRowCollection, and AcceptChanges has not been called.Deleted: The row was deleted using the Delete method of the DataRow.Modified: The row has been modified and AcceptChanges has not been called.
      

  5.   

    请问是在那里写入dataset.HasChanges()的判断呢???