473,809 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BindingManagerB ase.CancelCurre ntEdit() problem

I have a simple form with textboxes displaying records from a dataset.

To Add a record, i simply do this (successfully):
' bmb variable holds the me.bindingconte xt(dataset, "table"), which
returns a BindingManagerB ase object

Private Sub btnAdd_Click(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles btnAdd.Click
bmb.AddNew()
bmb.EndCurrentE dit()
End Sub

But what if the user wants to cancel and NOT add a record. I tried
this unsuccessfully:

Private Sub btnCancel_Click (ByVal sender As System.Object, ByVal e
As System.EventArg s) Handles btnCancel.Click
bmb.CancelCurre ntEdit()
End Sub

You'd think that it would remove all the blank entries from the form
and return me to where I was before clicking the "Add" button.
Instead, the button appears to do nothing at all.

Can anyone tell me what i'm missing? I know i'm missing something very
simple!

Thanks!!

John

Nov 21 '05 #1
0 1074

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

Similar topics

11
3767
by: Kostatus | last post by:
I have a virtual function in a base class, which is then overwritten by a function of the same name in a publically derived class. When I call the function using a pointer to the derived class (ClassB* b; b->func(); ) the base-class function is called instead of the new function in the derived class. All other similar functions (virtual in the base class and overwritten in the the derived class) work fine, it's just this one function. ...
11
2037
by: Marina | last post by:
Hi, I have a text control bound to a column that is of type Decimal. I am doing the validation myself to see if the user typed in something invalid, calling CancelCurrentEdit and cancelling the validation event. If the user typed in something that is not a number, such as 'abc', then doing this works. The old value stored in the data source is popped into the control.
117
7278
by: Peter Olcott | last post by:
www.halting-problem.com
18
6182
by: Ian Stanley | last post by:
Hi, Continuing my strcat segmentation fault posting- I have a problem which occurs when appending two sting literals using strcat. I have tried to fix it by writing my own function that does the strcat (mystract). Program below. However this appears not to have fixed the problem and I don't know why it shouldn't ? Any further help as to what else I am doing wrong will be appreciated regards
4
6276
by: Christopher Weaver | last post by:
How do I retrieve the position value after successfully finding the row that I'm looking for? I need to set BindingManagerBase.Position so that all of the controls on the form are synchronized. Is there another way of moving to a particular record within a dataset given the value of the key?
4
1955
by: Joe | last post by:
can someone help me with this code (1) daNewEmployer.Fill(DsNewEmployer) (2) daNewEmployee.Fill(DsNewEmployer) (3)bmbEmployer = BindingContext(DsNewEmployer, "Employer") I am trying to fill a the bindingmanagerbase with two tables in the third line of code. However, it only takes two arguments, the dataset "DsNewEmployer" and the table "Employer". I need to add the "Employee" table to
4
1744
by: Jesse Villani | last post by:
I will get this eventually, I have a combobox on a form which is bound to a dataset and displays correct values in the list. When i select a value from the list, i check to see what is the current row in a bindingManagerBase object is in the selectedValue event handler code. I print out, on labels the following values: bmb.Count and bmb.Position where bmb is the bindingManagerBase object.
1
1450
by: dbuchanan52 | last post by:
My newly added row will not become current. I have several textboxes bound to a DataGrid1 and a couple of buttons including 'btnNewRecord'. The datagrid is bound to a table in a dataset. What happen is that btnNewRecord adds a new row to DataGrid1 as expected, however the active row does not move to the newly added row! What am I missing?
4
1385
by: Dave | last post by:
I have a BindingManagerBase which is used witha stored precudure. When I try to execute the statement: this.BindingContext I get the error: System.ArgumentException was unhandled. Message="Child list for field table1 cannot be created." L. A. Jones
0
9721
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
10376
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
10379
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
9199
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...
0
6881
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();...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
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
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3014
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.