[Mono-list] DataRow events

ville vi64pa@koti.soon.fi
Thu, 28 Nov 2002 21:55:16 +0200


--------------Boundary-00=_40YAO8NBBG5W837IIP8T
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable


Hi!

I just wondered is this i good way to handel DataRow events (or is there=20
better ways). I am implementing XmlDataDocument and there for DataTable=20
events should work and I'm not realy into this DataRow/DataColumn stuff.

So, my idea was to invoke internal DataColumnChanged () etc. from DataRow=
=2E=20
DataRow have DataTable object which it belongs. DataColumnChanged () etc.=
=20
methods triggers DataTable events which are handled in XmlDataDocument.


--------------Boundary-00=_40YAO8NBBG5W837IIP8T
Content-Type: text/x-diff;
  charset="us-ascii";
  name="DataTable.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="DataTable.diff"

Index: DataTable.cs
===================================================================
RCS file: /cvs/public/mcs/class/System.Data/System.Data/DataTable.cs,v
retrieving revision 1.22
diff -u -r1.22 DataTable.cs
--- DataTable.cs	12 Nov 2002 01:41:04 -0000	1.22
+++ DataTable.cs	28 Nov 2002 19:42:58 -0000
@@ -112,6 +112,12 @@
 		}
 
 
+		internal void ChangedDataColumn (DataRow dr, DataColumn dc, object pv)
+		{
+			DataColumnChangeEventArgs e = new DataColumnChangeEventArgs (dr, dc, pv);
+			OnColumnChanged(e);
+		}
+
 		/// <summary>
 		/// Gets the collection of child relations for this DataTable.
 		/// </summary>

--------------Boundary-00=_40YAO8NBBG5W837IIP8T--