Article View: borland.public.csharpbuilder.language.csharp
Article #465WinForm, DatTable and DataColumn event
From: J.C.Voon
Date: Thu, 09 Dec 2004 10:49
Date: Thu, 09 Dec 2004 10:49
34 lines
2205 bytes
2205 bytes
Hi: I'm from Delphi world, In Delphi TDataSet (similler to DataTable) I can use the following event BeforeInsert, AfterInsert : Trigger before and after add a new record into data table, in the BeforeInsert event i can raise an exception to stop the Add action BeforeDelete, AfterDelete : Trigger before and after the record has been delete from the data table, in the BeforeDelete event i can raise an exception to stop the Delete action BeforePost, AfterPost : Trigger before and after the record save into the data table, in the BeforePost event i can raise an exception to stop the Post action BeforeCancel, AfterCancel : Trigger before and after the cancel the current changes, in the BeforeCancel event i can raise an exception to stop the Cancel action And In the TDataField (similler to DataColumn) i can have OnValidate event to do field validation, if an exception is raise in this event the bound control will remain focus, if the data column is edit in grid the validation will cause the cell position remain on the invalid cell, if i change the value in code, this event will trigger too. So, How can i simulate those event in .Net DataTable ? Please Help. Thank JCVoon
Technical Details
Message-ID:
<41b82d74.36803821@forums.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,7faf1684afa43738,start X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit From: jcvoon_99@yahoo.com (J.C.Voon) Newsgroups: borland.public.csharpbuilder.language.csharp Subject: WinForm, DatTable and DataColumn event Date: Thu, 09 Dec 2004 10:49:04 GMT Message-ID: <41b82d74.36803821@forums.borland.com> X-Newsreader: Forte Agent 1.5/32.452 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 60.48.82.147 X-Trace: newsgroups.borland.com 1102589161 60.48.82.147 (9 Dec 2004 02:46:01 -0800) Lines: 34 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail