473,657 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BeginEdit Method (Event?)

Alright on a DataRow you have the BeginEdit method

Where can I catch an event that tells me that method is being fired or does
one exist?

Thanks,

-CJ
Nov 20 '05 #1
13 3036
CJ,
My Sceppa ADO.NET book is at the office.

I believe the closest you will get is to use DataTable.RowCh anging &
DataTable.Colum nChanging.

Which doesn't identify the BeginEdit itself, however they identify when the
values are changing...

Hope this helps
Jay

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:eR******** ******@TK2MSFTN GP12.phx.gbl...
Alright on a DataRow you have the BeginEdit method

Where can I catch an event that tells me that method is being fired or does one exist?

Thanks,

-CJ

Nov 20 '05 #2
Heh... my Sceppa book is sitting right next to me...

didn't find anything in there but I will look further.. I suppose that
would be a way to do it...

However, when you call BeginEdit it is supposed to suspend events from
firing... owever, I suppose I could get it from the col changed event
without a begin edit...

hmm...

that kinda sucks...

I could always catch the first colchanged event, call begin edit and add my
own event handlers... but that just seems like too much work... oh well, I
shall work with it.. Appreciate the help.

-CJ
"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:em******** ******@tk2msftn gp13.phx.gbl...
CJ,
My Sceppa ADO.NET book is at the office.

I believe the closest you will get is to use DataTable.RowCh anging &
DataTable.Colum nChanging.

Which doesn't identify the BeginEdit itself, however they identify when the values are changing...

Hope this helps
Jay

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:eR******** ******@TK2MSFTN GP12.phx.gbl...
Alright on a DataRow you have the BeginEdit method

Where can I catch an event that tells me that method is being fired or

does
one exist?

Thanks,

-CJ


Nov 20 '05 #3
CJ,
Doh! you are right... DataRow.BeginEd it suspends events...

I was thinking only DataTable.Begin LoadData suspended events.

I'm not sure if Sceppa talks about it or not, I just find its easier to find
details about ADO.NET in Sceppa's book over MSDN itself...

Unfortunately DataRow.BeginEd it is not overridable either, so you cannot
derive from DataRow and add the functionality.. .

Hope this helps
Jay

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:ul******** ******@TK2MSFTN GP09.phx.gbl...
Heh... my Sceppa book is sitting right next to me...

didn't find anything in there but I will look further.. I suppose that
would be a way to do it...

However, when you call BeginEdit it is supposed to suspend events from
firing... owever, I suppose I could get it from the col changed event
without a begin edit...

hmm...

that kinda sucks...

I could always catch the first colchanged event, call begin edit and add my own event handlers... but that just seems like too much work... oh well, I shall work with it.. Appreciate the help.

-CJ
"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:em******** ******@tk2msftn gp13.phx.gbl...
CJ,
My Sceppa ADO.NET book is at the office.

I believe the closest you will get is to use DataTable.RowCh anging &
DataTable.Colum nChanging.

Which doesn't identify the BeginEdit itself, however they identify when

the
values are changing...

Hope this helps
Jay

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:eR******** ******@TK2MSFTN GP12.phx.gbl...
Alright on a DataRow you have the BeginEdit method

Where can I catch an event that tells me that method is being fired or

does
one exist?

Thanks,

-CJ



Nov 20 '05 #4
CJ:

I don't think the DataRow has any events, and there are only like 6 for the
datatable ,RowChanging Rowchanged, ColumnChanging/Changed but nothign about
editing.

You may be better off trying to trap it in a control, but even there I
think most are going to be kinda limited
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:eR******** ******@TK2MSFTN GP12.phx.gbl...
Alright on a DataRow you have the BeginEdit method

Where can I catch an event that tells me that method is being fired or does one exist?

Thanks,

-CJ

Nov 20 '05 #5
Jay,

Yeah noticed all the things you were talking about. Which makes me wonder
how C1 did it in the first place.

Ahh, now the plot thickens as I reveal "why" I'm doing this. We were using
C1's DataObjects, unfortuantly C1 doesn't do very good debugging and its
suprisingly leaky (because some references are never destroyed, which should
be, but because their object model gets a little confusing I can't find the
source of all the errors).

However, C1 is inherited off the ADO.NET model, which is what led us to go
with it in the first place. And they have events that trigger off
BeginEdit... However, I don't think they directly inherit from DataRow, but
do use it as a storeage basin if you will...

On my beginedits I run some code to do some manipulation etc... mainly
decryption of certain fields, was just trying to replicate that
functionality. I figured out most of C1 without having to do much work. I
think its an incredibly over priced package for not much value. We'll just
have to see what ObjectSpaces brings to the table.

Thanks for your help, I have a workaround, I just didn't want to do it. =)

-CJ

CJ,
Doh! you are right... DataRow.BeginEd it suspends events...

I was thinking only DataTable.Begin LoadData suspended events.

I'm not sure if Sceppa talks about it or not, I just find its easier to find details about ADO.NET in Sceppa's book over MSDN itself...

Unfortunately DataRow.BeginEd it is not overridable either, so you cannot
derive from DataRow and add the functionality.. .

Hope this helps
Jay

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:ul******** ******@TK2MSFTN GP09.phx.gbl...
Heh... my Sceppa book is sitting right next to me...

didn't find anything in there but I will look further.. I suppose that
would be a way to do it...

However, when you call BeginEdit it is supposed to suspend events from
firing... owever, I suppose I could get it from the col changed event
without a begin edit...

hmm...

that kinda sucks...

I could always catch the first colchanged event, call begin edit and add my
own event handlers... but that just seems like too much work... oh well, I
shall work with it.. Appreciate the help.

-CJ
"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in

message news:em******** ******@tk2msftn gp13.phx.gbl...
CJ,
My Sceppa ADO.NET book is at the office.

I believe the closest you will get is to use DataTable.RowCh anging &
DataTable.Colum nChanging.

Which doesn't identify the BeginEdit itself, however they identify when
the
values are changing...

Hope this helps
Jay

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:eR******** ******@TK2MSFTN GP12.phx.gbl...
> Alright on a DataRow you have the BeginEdit method
>
> Where can I catch an event that tells me that method is being fired

or does
> one exist?
>
> Thanks,
>
> -CJ
>
>



Nov 20 '05 #6
William,

Yeah I meant datatable, which actually fires a RowChanging event... my
fault, one of those "seeing" things ya know?

check out my other message, basically trying to replicate C1 without all the
B.S. involved...

I think I'm going to be one of the many to develop a new O/R mapper, just
need someone to build the Designer controls. =)

-CJ

"William Ryan eMVP" <do********@com cast.nospam.net > wrote in message
news:e1******** ******@TK2MSFTN GP12.phx.gbl...
CJ:

I don't think the DataRow has any events, and there are only like 6 for the datatable ,RowChanging Rowchanged, ColumnChanging/Changed but nothign about editing.

You may be better off trying to trap it in a control, but even there I
think most are going to be kinda limited
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:eR******** ******@TK2MSFTN GP12.phx.gbl...
Alright on a DataRow you have the BeginEdit method

Where can I catch an event that tells me that method is being fired or

does
one exist?

Thanks,

-CJ


Nov 20 '05 #7
CJ,
I have not actually used C1's DataObject, I looked at it briefly...

Looking at C1.Data.C1DataR ow just now, they do not inherit from DataRow as
you indicate, however they implement the same interfaces!

You could create a similar proxy object by implementing the same interfaces,
I'm not sure if the DataTable itself will like you or not...

The interfaces you need are:

System.Componen tModel.ICustomT ypeDescriptor
System.Componen tModel.IDataErr orInfo
System.Componen tModel.IEditabl eObject

The third being the interface where BeginEdit comes from.

Hope this helps
Jay
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:uH******** ******@tk2msftn gp13.phx.gbl...
Jay,

Yeah noticed all the things you were talking about. Which makes me wonder
how C1 did it in the first place.

Ahh, now the plot thickens as I reveal "why" I'm doing this. We were using C1's DataObjects, unfortuantly C1 doesn't do very good debugging and its
suprisingly leaky (because some references are never destroyed, which should be, but because their object model gets a little confusing I can't find the source of all the errors).

However, C1 is inherited off the ADO.NET model, which is what led us to go
with it in the first place. And they have events that trigger off
BeginEdit... However, I don't think they directly inherit from DataRow, but do use it as a storeage basin if you will...

On my beginedits I run some code to do some manipulation etc... mainly
decryption of certain fields, was just trying to replicate that
functionality. I figured out most of C1 without having to do much work. I think its an incredibly over priced package for not much value. We'll just have to see what ObjectSpaces brings to the table.

Thanks for your help, I have a workaround, I just didn't want to do it. =)

-CJ

CJ,
Doh! you are right... DataRow.BeginEd it suspends events...

I was thinking only DataTable.Begin LoadData suspended events.

I'm not sure if Sceppa talks about it or not, I just find its easier to find
details about ADO.NET in Sceppa's book over MSDN itself...

Unfortunately DataRow.BeginEd it is not overridable either, so you cannot
derive from DataRow and add the functionality.. .

Hope this helps
Jay

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:ul******** ******@TK2MSFTN GP09.phx.gbl...
Heh... my Sceppa book is sitting right next to me...

didn't find anything in there but I will look further.. I suppose that would be a way to do it...

However, when you call BeginEdit it is supposed to suspend events from
firing... owever, I suppose I could get it from the col changed event
without a begin edit...

hmm...

that kinda sucks...

I could always catch the first colchanged event, call begin edit and
add
my
own event handlers... but that just seems like too much work... oh

well,
I
shall work with it.. Appreciate the help.

-CJ
"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in

message news:em******** ******@tk2msftn gp13.phx.gbl...
> CJ,
> My Sceppa ADO.NET book is at the office.
>
> I believe the closest you will get is to use DataTable.RowCh anging &
> DataTable.Colum nChanging.
>
> Which doesn't identify the BeginEdit itself, however they identify when the
> values are changing...
>
> Hope this helps
> Jay
>
> "CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
> news:eR******** ******@TK2MSFTN GP12.phx.gbl...
> > Alright on a DataRow you have the BeginEdit method
> >
> > Where can I catch an event that tells me that method is being
fired or > does
> > one exist?
> >
> > Thanks,
> >
> > -CJ
> >
> >
>
>



Nov 20 '05 #8
Hi CJ,

Maybe a little bit late however I did some small tests

As far as i could see was only affected the rowchanged and rowchanging.
Columnschanging was not affected.

It is just a simple test.

\\\This was a part of the test it was done twice as you can understand and
you can assing it only if the row is added, however I think row added did
throw the event also the same as the delete.
Private Sub loadrows()
Dim dr As DataRow = dtName.NewRow
dtName.Rows.Add (dr)
If CJ Then
dr.BeginEdit()
End If
dr(0) = "mars"
dr(0) = "nuts"
dr(0) = "venus"
dr(1) = "helena"
dtName.Rows(0). Delete()
If CJ Then
dr.EndEdit()
End If
ds.AcceptChange s()
End Sub

I had at least only the rowchange event and with that I have put on the
console.

FalseRowChanged
FalseRowChanged
FalseRowChanged
FalseRowChanged
FalseRowChanged
TrueRowChanged
TrueRowChanged

I hope this helps a very little bit.

Cor
Nov 20 '05 #9
Jay,

Yeah, it implements the same interfaces, but you have to look at the
StoreageDataRow or StoreageDataTab le or StorageDataset properties of their
respective C1 counterparts. These are all ADO.NET objects (DataRow,
DataTable,DataS et) which actually stores the value...

Then implement the same interfaces in order to make it work with standard
databinding within winforms... nice feature... but the focus was misplaced
in creating DataObjects I think...

I'm most dissapointed with the support though... this is the problem with
outsourcing software.. Sure, it's done, it's *pretty* good... but after
awhile the software house stops giving support, which is really annoying.

"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:uM******** ******@tk2msftn gp13.phx.gbl...
CJ,
I have not actually used C1's DataObject, I looked at it briefly...

Looking at C1.Data.C1DataR ow just now, they do not inherit from DataRow as
you indicate, however they implement the same interfaces!

You could create a similar proxy object by implementing the same interfaces, I'm not sure if the DataTable itself will like you or not...

The interfaces you need are:

System.Componen tModel.ICustomT ypeDescriptor
System.Componen tModel.IDataErr orInfo
System.Componen tModel.IEditabl eObject

The third being the interface where BeginEdit comes from.

Hope this helps
Jay
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:uH******** ******@tk2msftn gp13.phx.gbl...
Jay,

Yeah noticed all the things you were talking about. Which makes me wonder
how C1 did it in the first place.

Ahh, now the plot thickens as I reveal "why" I'm doing this. We were

using
C1's DataObjects, unfortuantly C1 doesn't do very good debugging and its
suprisingly leaky (because some references are never destroyed, which

should
be, but because their object model gets a little confusing I can't find

the
source of all the errors).

However, C1 is inherited off the ADO.NET model, which is what led us to go with it in the first place. And they have events that trigger off
BeginEdit... However, I don't think they directly inherit from DataRow,

but
do use it as a storeage basin if you will...

On my beginedits I run some code to do some manipulation etc... mainly
decryption of certain fields, was just trying to replicate that
functionality. I figured out most of C1 without having to do much work.

I
think its an incredibly over priced package for not much value. We'll

just
have to see what ObjectSpaces brings to the table.

Thanks for your help, I have a workaround, I just didn't want to do it. =)
-CJ

CJ,
Doh! you are right... DataRow.BeginEd it suspends events...

I was thinking only DataTable.Begin LoadData suspended events.

I'm not sure if Sceppa talks about it or not, I just find its easier to
find
details about ADO.NET in Sceppa's book over MSDN itself...

Unfortunately DataRow.BeginEd it is not overridable either, so you

cannot derive from DataRow and add the functionality.. .

Hope this helps
Jay

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:ul******** ******@TK2MSFTN GP09.phx.gbl...
> Heh... my Sceppa book is sitting right next to me...
>
> didn't find anything in there but I will look further.. I suppose

that > would be a way to do it...
>
> However, when you call BeginEdit it is supposed to suspend events from > firing... owever, I suppose I could get it from the col changed event > without a begin edit...
>
> hmm...
>
> that kinda sucks...
>
> I could always catch the first colchanged event, call begin edit and add my
> own event handlers... but that just seems like too much work... oh

well,
I
> shall work with it.. Appreciate the help.
>
> -CJ
>
>
> "Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in

message
> news:em******** ******@tk2msftn gp13.phx.gbl...
> > CJ,
> > My Sceppa ADO.NET book is at the office.
> >
> > I believe the closest you will get is to use DataTable.RowCh anging & > > DataTable.Colum nChanging.
> >
> > Which doesn't identify the BeginEdit itself, however they identify

when
> the
> > values are changing...
> >
> > Hope this helps
> > Jay
> >
> > "CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
> > news:eR******** ******@TK2MSFTN GP12.phx.gbl...
> > > Alright on a DataRow you have the BeginEdit method
> > >
> > > Where can I catch an event that tells me that method is being

fired
or
> > does
> > > one exist?
> > >
> > > Thanks,
> > >
> > > -CJ
> > >
> > >
> >
> >
>
>



Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9174
by: Jon Davis | last post by:
The garbage handler in the .NET framework is handy. When objects fall out of scope, they are automatically destroyed, and the programmer doesn't have to worry about deallocating the memory space for those objects. In fact, all the programmer has to worry about is the total sum of objects loaded into RAM at any known point. Memory leaks are not a problem. .... So one would like to think. The reality is that delegates and event...
1
5348
by: Jason Huang | last post by:
Hi, I am wondering how to use the BeginEdit() and EndEdit() to update data, given in a web form. Would someone give me some advise? Thanks. Jason
3
1951
by: Edward Diener | last post by:
According to the CLS specification, the accessibility of the methods for adding, removing, and raising an event must be identical. There appear to be a few problems with this: 1) According to the Managed C++ specifications, if one declares a public event without any attempt to provide one's own event access methods, clearly the most common case, the compiler generates public add_ and remove_ methods for the event and a protected raise_...
0
2089
by: Agnes | last post by:
My problem is delete a row in Datagird , and then process "daTable.update(dsTable,myTable)" I got a seroius error This row had been removed from the table .. etc.....BeginEdit() will allow creation of new data in this row First, I am thinking the errors belong to "daTable.update" xxx Finally, I found that the main errors in my dataTable of my datagrid. I had process some codes in my Datatable row changed event. Now I found my bugs and...
0
2625
by: George | last post by:
This is driving me crazy. I have a listview that has LabelEdit set to true. In the AfterLabelEdit event, I do my validation on the label text. If the label isn't valid, it sets e.canceledit = true and calls the BeginEdit event. I have included below the entire event handler code again as shown at the end of this post. Assume for this scenario that the label edited to an invalid value After editing the value, if the user tabs away from...
1
1513
by: harini | last post by:
i am trying to use BeginEdit in my windows form to make some columns of my datagrid editable and update the changes...i am coding it in c#...if anybody has the code snippet which works pls do share it with me...thanks a lot! kindly help
5
6268
by: Anil Gupte/iCinema.com | last post by:
I have the following code: Dim strContentInfo As String = "ContentID='" & CUID & "'" Dim drContentInfo As DataRow() = GlobalDataSet.Tables("PaidContent").Select(strContentInfo) <Some other stuff happens here to set NumPlays> drContentInfo(0).BeginEdit()
0
869
by: Tommaso Caldarola | last post by:
CustomerCollection : IBindingList Customer : IEditableObject CustomeCollection as a datasource for Datagrid CustomeCollection.AllowEdit set to False Clicking on a cell Customer.BeginEdit is invoked. Is it correct this behaviour? I think no, maybe a bug of Datagrid.
0
1640
by: prpradip | last post by:
In C# I have used TreeView in my Form. In TreeNode editing I have used validation so that if user enter illegal characters and press enter, Error message is shown to user. But when user press Ok in messagebox, TreeNode doesn't return to edit mode even I call TreeNode.BeginEdit(). However it is working fine in ListView. I dont want to override TreeView. Please any suggestion with code. API method is also welcomed.
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2740
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.