Binding Navigator - how do you get Validate to fire when someone clicks the add button more than once?

Posted on 2009-02-22
Last Modified: 2013-11-26
I've been trying, once again, to do some of the simplest things with the BindingNavigator tied to a BindingSource and without generating errors.
One thing I can't seem to solve, it that if a user clicks the "Add" button on the BindingNavigator more than once, it attempts to save the previous record without firing the Validate event (and saves nulls even though they are trapped in the dataset partial class).
Clicking the Save icon, I can trap that click event and run a save routine and validation works just fine.
Since there seems to be no way to enforce validation rules (on the recordset) during this situation, I need to disable the add button after it is clicked once or somehow prevent the button from being active if the current record has not been saved or validated.
Code to follow - hopefully soon
Question by:bd9000
    LVL 11

    Accepted Solution

    yaps binding navigator generated code  works fine with simple situations but in complex scenarios you have to write your own logic,

    please delete the add new and save button and replace it with your own customized buttons,

     make your own logic and program it into the controls .  you will love the control you get on the database operations.


    Author Comment

    I made the add button invisible as soon as it is clicked - I have some of my own logic now.  I guess I'm still surprised that the 3rd generation of bound controls is still unusable for real-world situations.  Unfortunately, I think there are too many people out there wasting inordinate amount of time finding all the work-arounds than just doing it the old-fashioned way (binding your own controls, write your own navigators). I would have had the project done weeks ago had I taken the old route. Geez!
    LVL 11

    Expert Comment

    Yaps Same with me i m using binding navigator but all the update and new record logic written by me.

    actually it varies case to case,


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now