PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You use Microsoft .NET Framework 4 to create a Windows Forms application.
You have a dataset as shown in the following exhibit.
You plan to add a DataGridView to display the dataset.
You need to ensure that the DataGridView meets the following requirements:
* Shows Order Details for the selected order.
* Shows only Order Details for items that have UnitPrice greater than 20.
* Sorts Products by ProductName
Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
ordersBindingSource.DataSource = productsBindingSource;
ordersBindingSource.DataMember = “FK_Order_Details_Products”;
productsBindingSource.Filter = “UnitPrice > 20”;
productsBindingSource.Sort = “ProductName”;

B.
productsDataGridView.DataSource = ordersBindingSource;
productsBindingSource.Filter = “UnitPrice > 20”;
productsBindingSource.Sort = “ProductName”;

C.
order_DetailsBindingSource.DataSource = ordersBindingSource;
order_DetailsBindingSource.DataMember = “FK_Order_Details_Orders”;
order_DetailsBindingSource.Filter = “UnitPrice > 20”;
productsBindingSource.Sort = “ProductName”;

D.
order_DetailsDataGridView.DataSource = ordersBindingSource;
order_DetailsBindingSource.Filter = “UnitPrice > 20”;
productsBindingSource.Sort = “ProductName”;


Leave a Reply