Scenario: You are developing a Windows Forms application and need to display a list of customer records from a database. Which ADO.NET control or method of data binding would you use?

  • DataGridView
  • DataReader
  • DataAdapter
  • ListBox
The correct option is DataGridView. DataGridView is a powerful control in ADO.NET for displaying and editing tabular data. It provides a customizable and efficient way to bind data from a database, making it ideal for displaying customer records in a Windows Forms application. DataReader is typically used for read-only, forward-only access to data, DataAdapter is used for filling datasets, and ListBox is more suitable for displaying simple lists of items.
Add your answer
Loading...

Leave a comment

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