473,388 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

BindingManagerBase.CancelCurrentEdit() 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.bindingcontext(dataset, "table"), which
returns a BindingManagerBase object

Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnAdd.Click
bmb.AddNew()
bmb.EndCurrentEdit()
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.EventArgs) Handles btnCancel.Click
bmb.CancelCurrentEdit()
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 1044

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

Similar topics

11
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...
11
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...
117
by: Peter Olcott | last post by:
www.halting-problem.com
18
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...
4
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...
4
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...
4
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...
1
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...
4
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. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.