I have a Visual Basic project that uses a form to save information to a XML database. The form controls are bound to a DataTableBindingSource and all is fine except the "AddNewItem" button on the BindingNavigator seems to be saving the form. This is not the behavior I expected since there is also a SaveItem button that works great for saving the data to the DataTable. And since I wish to automatically clear the form for a new record after saving, I wrote a routine that clears all the TextBoxes, CheckBoxes, DropDowns, etc… when the SaveItem is clicked. The SaveItem also writes the DataSet to the XML database so no data is lost, but then when I click the AddItem button, it saves the Cleared form over the existing record in the DataTable, so when I click the SaveItem the altered DateTable gets written to the XML Database. Is there any way to grab the control of the AddItem button and alter its behavior so that it doesn’t save the form, or am I not seeing a bigger problem if I did that? I Know I could write my own AddNewItem routine, but the button would be in the wrong place…
BindingNavigator: AddItem button saves the form, but does not clear the form for the new Record
336 Views Asked by Wishful Thinking At
0
There are 0 best solutions below
Related Questions in VISUAL-STUDIO-2017
- No templates in Visual Studio 2017
- Xamarin.iOS on the Mac Server is not compatible
- NuGet Console in visual studio 2017 RC won't Add-Migration or Update-Database?
- VS2017 RC Web deploy - ERROR_CERTIFICATE_VALIDATION_FAILED
- How to use an ASP.NET Core environment variable in testing with Visual Studio
- How to create F# .Net Core ConsoleApp in Visual Studio 2017 RC
- Can I suppress a specific C6031 warning? CString::LoadString
- InterlockedExchange issue with C28112/3
- AppSettings.*.json files not copied on Publish in ASP.NET CORE 1.1
- Does Visual Studio 2017 Community create a Services folder for Dependency Injection with Core 1.0?
- dotnet exec needs a managed .dll or .exe extension while adding Entity Framework Core (1.1.0) Migrations
- project can't be set as Class Library in visual studio
- How to connect with SQL Server database using .NET Core Class Library (.NET Standard)?
- Using Dependency Injection with .NET Core Class Library (.NET Standard)
- Localisation that can be read by a portable F# project (Profile 259)
Related Questions in SAVE
- Trying to save an np array with string and floats, but getting a error
- saving matlab file (.mat) with dynamic name
- Saving Data form in CakePHP
- Python - Pickle init takes 4 arguments - 1 given
- Losing values after reading from file and saving np array to the same file
- Android: Intentionally Blank Lines in EditText Are Not Getting Saved
- How to save cell value(image) of a vertical grid control (devexpress) to sql database?
- Open in same view controller as closed on (swift)
- MvvmCross on iOS - Strategies for Saving and Restoring State
- How to make a save button
- C# - Settings.Default.Save() is very slow
- Saving text in labels
- Python: Can you Save an Object and all of it's Associated Values?
- Implementing both Serializable and Parcelable interfaces from an object in Android - conflict
- Disable Excel save option but allow macro save
Related Questions in BEHAVIOR
- Why do print and echo behave differently in a "for" loop
- MVC 5.0 strange behavior
- Strange behavior of media query in CSS. Inheriting attribute values from other statement
- Polymer 1.0 paper-drawer-panel toggle is not working
- Caliburn.Micro attach event handler on event of Behavior
- Unexpected replacement of zero in Python list comprehension
- Strange Behavior: Floating Point Error after Appending to List
- Android CalendarView with no default date needed
- Difference between behavior and -ms-behavior
- C++ differ between Linking with .o and with .a file: different behavior, why?
- WPF attached behavior triggering after button click
- Shared Polymer Behaviour Properties
- Can I call behaviors methods directly without eventproxy?
- Sharing behavior between lazy loaded app parts
- Unexpected behavior with strnatcmp() PHP
Related Questions in BINDINGNAVIGATOR
- BindingNavigator won't display newly added records
- How to print dialogue ok after delegate?
- Save data of 2 SqlDataAdapters Sequentially
- Binding Navigator Navigation Mixed
- How to execute EF5 savechanges from a derived BindingNavigator class
- Coding of Binding Navigator buttons
- How do I get rid of the drop shadow on my bindingnavigator?
- C# Visual Studio Microsoft 2022 BindingNavigator not showing
- getting the primary key from a bindingsource save in c sharp
- How to save edits to a data bound table or query (ultra basic)
- Save button is missing in binding navigator
- BindingNavigator: AddItem button saves the form, but does not clear the form for the new Record
- VB Adding code to BindingNavigatorMoveNextItem button
- Need clarification about how to apply a custom update to data adapter source
- C#, BindingNavigator, Ugly line at the right end
Related Questions in NEW-ITEM
- Unable to create Registry value through Powershell
- "new-item" isn't recognized as command in PowerShell
- New-Item messing up my variable PowerShell
- Search Registry and create New-Item
- Add Folders On Remote Servers With PowerShell
- Powershell: What's the right way to output full error messages from New-Item?
- Scripting the creation of a file on multiple drives using foreach
- Powershell. Is it possible to bind New-Item -Value parameter ByPropertyName?
- BindingNavigator: AddItem button saves the form, but does not clear the form for the new Record
- Creating functions dynamically in a module in PowerShell
- Various lenght of paths using new-item in powershell
- Add only new items from listbox to SQL
- How to check for and create a shared (hidden) admin directory?
- How to use PowerShell to create a SymbolicLink for an exe with a file path parameter?
- Add new Item with the same form to an existing Session-Storage
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?