Scenario: Your WinForms application requires the user to edit and save customer information. How can you ensure that changes made in a data-bound control are propagated back to the data source?

  • Implement the INotifyPropertyChanged interface
  • Use the DataBindingComplete event
  • Call the Update method of the data adapter
  • Set the DataPropertyName property of the data-bound control
The correct option is Call the Update method of the data adapter. When working with data-bound controls in WinForms applications, changes made in the controls need to be saved back to the underlying data source. One way to achieve this is by calling the Update method of the data adapter associated with the data source. This method applies changes made in the data-bound controls to the database.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *