What should you do ?

You are developing a Windows Forms application that contains a DataGridView control. The DataGridView capture the customer’s name, address, and phone number.

You have been asked to provide data validation in a DataGridView to prevent users from leaving the..

You need to ensure that users cannot tab out of the name field without entering data

What should you do ?

You are developing a Windows Forms application that contains a DataGridView control. The DataGridView capture the customer’s name, address, and phone number.

You have been asked to provide data validation in a DataGridView to prevent users from leaving the..

You need to ensure that users cannot tab out of the name field without entering data

What should you do ?

A.
Validate the name field in the CellValidating event. Set e.Cancel = true if the name field is

B.
Validate the name field in the CellErrorTextChanged event. Get e.RowIndex if the name field ..

C.
Validate the name field in the CellEnter event. Set the focus on the name field if the name …

D.
Validate the name field in the CancelRowEdit event. Set the focus on the name field if the name …



Leave a Reply 2

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


Mr ijs

Mr ijs

Full question text:

You are developing a Windows Forms application that contains a DataGridView control. The DataGridView is
composed of several fields that capture the customer’s name, address, and phone number. You have been
asked to provide data validation in a DataGridView to prevent users from leaving the name field if the name
field is empty. You need to ensure that users cannot tab out of the name field without entering data. What
should you do?

Mr ijs

Mr ijs

Full awnser texts:

A. Validate the name field in the CellValidating event. Set e. Cancel – true if the name field is empty.

B. Validate the name field in the CellErrorTextChanged event. Get e.Rowlndex if the name field is empty.

C. Validate the name field in the CellEnter event. Set the focus on the name field if the name field is empty.

D. Validate the name field in the CancelRowEdit event. Set the focus on the name field if the name field is
empty.