2002-12-15 Ville Palo <vi64pa@koti.soon.fi>
authorVille Palo <ville@mono-cvs.ximian.com>
Sun, 15 Dec 2002 10:32:32 +0000 (10:32 -0000)
committerVille Palo <ville@mono-cvs.ximian.com>
Sun, 15 Dec 2002 10:32:32 +0000 (10:32 -0000)
* DataRow.cs:
* DataRowCollection.cs: Moved event triggering from DataRow to
DataRowCollection.

svn path=/trunk/mcs/; revision=9666

mcs/class/System.Data/System.Data/ChangeLog
mcs/class/System.Data/System.Data/DataRow.cs
mcs/class/System.Data/System.Data/DataRowCollection.cs

index 98a9900e36929b14af09251dc06deaf9fcd17dd3..054e51d80b847c86e96f6bf0c2ca11092d2221db 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-15  Ville Palo <vi64pa@koti.soon.fi>\r
+\r
+       * DataRow.cs:\r
+       * DataRowCollection.cs: Moved event triggering from DataRow to\r
+       DataRowCollection.\r
+       \r
 2002-12-09  Ville Palo <vi64pa@koti.soon.fi>\r
 \r
        * DataSet.cs: Little fix to WriteTable () -method \r
index 638c5c8494de650e9ad70c33b12a3f9399262291..622251a2dc7dddb971d407adf0cf186ea59631b8 100644 (file)
@@ -198,7 +198,7 @@ namespace System.Data {
                                        case DataRowVersion.Proposed:
                                                return proposed[columnIndex];
                                        case DataRowVersion.Current:
-                                               return current[columnIndex];
+                                               return current[columnIndex];
                                        case DataRowVersion.Original:
                                                return original[columnIndex];
                                        default:
@@ -397,7 +397,6 @@ namespace System.Data {
                        switch (rowState) {
                        case DataRowState.Added:
                                Table.Rows.Remove (this);
-                               _table.DeletedDataRow (this, DataRowAction.Delete);
                                break;
                        case DataRowState.Deleted:
                                throw new DeletedRowInaccessibleException ();
index 9a2cd8cf7cc70aa784b025182971bd7768a07dbc..a5fb4a4f03982a9a947f292419c43368ef85f48b 100644 (file)
@@ -132,14 +132,17 @@ namespace System.Data
                public void Remove (DataRow row) 
                {
                        list.Remove (row);
+                       table.DeletedDataRow (row, DataRowAction.Delete);
                }
 
                /// <summary>
                /// Removes the row at the specified index from the collection.
                /// </summary>
                public void RemoveAt (int index) 
-               {
-                       list.RemoveAt (index);
+               {                       
+                       DataRow row = (DataRow)list [index];
+                       list.RemoveAt (index);                  
+                       table.DeletedDataRow (row, DataRowAction.Delete);
                }
 
                ///<summary>