Sample Exam 1

Question 1You have created a DataSet that contains a single DataTable object named Customers. The Customers DataTable has all of the rows and columns from the Customers table in your database. You would like to bind only selected columns from the Customers table to a DataGrid control. You want a solution that requires minimum programming, and you want to have minimum impact on the performance of SQL Server. How should you proceed?
  • A. Create a second DataTable in the DataSet. Copy the desired data to the second DataTable. Bind the second DataTable to the DataGrid.

  • B. Create a Command object to retrieve the desired columns from the DataTable. Bind the Command object to the DataGrid.

  • C. Bind the DataGrid to the entire DataTable. Use ...

Get Developing and Implementing Windows®-Based Applications with Visual C#™ .NET and Visual Studio® .NET Exam Cram™ 2 (Exam 70-316) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.