473,385 Members | 1,655 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,385 software developers and data experts.

how to simulate the bindingNavigator's AddNew Button

1
Hello,
First, sorry for my English, I hope you will understand me:) I'm new in using C Sharp and more with the bindingNavigator.

What I would do is to simulate the button "add" (bindingnavigatorAddNewItem_Click) programmatically. Indeed, rather than either the user who clicks on this button, I will like to call it programmatically.
What I do is:

bindingNavigator.BindingSource = bindingSource;
...
...
...

bindingNavigatorAddNewItem_Click (...){

BindingSource.AddNew ();

}


It seems that I didn't do the simulation it in the right way. I wouldn't like to be obliged to make a EndEdit () and an Update() prior to navigate my bindingnavigator. And if I didn't do the Update, I lose the data I've entered ?!?!?!

What I understand is that when you don't set de AddNewItem to None in the bindingNavigator, it calls something (that I don't know) and after call the event bindingNavigatorAddNewItem_Click. What I miss?


Is there someone who could help me please?
Jun 23 '09 #1
0 3892

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: johnny | last post by:
On a form I would like to simulate a button click when the Enter is pressed. My form is setup and it works if the delegate for the key pressed on the form calls the delegate for the button pressed....
5
by: John | last post by:
Hi When I press the delete button on the BindingNavigator it deletes the record without any warning. How can I add a warning dialog when the delete button on the BindingNavigator is pressed and...
0
by: Chuck Gantz | last post by:
I have a child table (the "TestType" that is in my code below) that I am trying to bind to its parent ("Test" in the code. I've commented out that line below sice it doesn't fix my problem). The...
1
by: reidarT | last post by:
I have entered a BindingNavigator toolbar in a bound form and can manage to browse records and I am able to enter data in a new record. I am ot able to save the data and therefore I have entered...
2
by: Dave | last post by:
I have a c# program that uses the bindingnavigator control. It works fine, but I want to add the ability for a user to change his mind after clicking 'delete' to delete a record. So if the user...
3
by: michael sorens | last post by:
I have generated an XmlDocument, then bound it to a DataGridView (thanks to a pointer from PeterBromberg in a separate, recent posting). Now I want to connect a BindingNavigator, but my rudimentary...
0
by: eljainc | last post by:
Hello, I'm using a BindingNavigator control in my c# program. However, when the click() event is fired for an event, say the DeleteItem button, how do I modify the event handler to confirm the...
7
by: Dale Sampson | last post by:
As you can tell, I am new to VS.net. I have a VB project with a defined data source pointing to a table in a ..mdb file.-- The associated fields are displayed in textboxes using the...
2
by: csharpa | last post by:
Hi, I’m using VS2005 and the bindingnavigator control. Right now I’m using 2 bindingnavigator control (each for one table) in order to generate the new ID when I clicked the ‘add new” button. But...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.