单项选择题
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 ...
相关考题
-
单项选择题
You use Microsoft .NET Framework 4 to create an application. The application performs resource-intensive calculations that consist of multiple layers of nested looping. The application will be deployed to servers that contain varying hardware configurations. You need to ensure that the application utilizes CPU resources on the server in the most efficient manner. You want to achieve this goal by using the minimum amount of code. What should you do?()
A. Use multiple System.Threading.Thread objects.
B. Use the background worker process (BWP).
C. Use the Thread.BeginInvoke method.
D. Use the Parallel.For method. -
单项选择题
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Framework (WPF) application. You have a page named myPage that contains the following code fragment. You need to ensure that other pages in your application can use CustomerNameBrush. What should you do? ()
A. Move CustomerNameBrush to the App.xaml file.
B. Inherit from myPage in all additional pages that use CustomerNameBrush.
C. Add a reference to myPage to all additional pages that use CustomerNameBrush.
D. Bind controls that need CustomerNameBrush to myPage.Resources.CustomerNameBrush. -
单项选择题
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application has a window named MainWindow that has a StackPanel control named sp as the root element. You want to create a Button control that contains a TextBlock control with the "Save" Text property. You need to create the control dynamically and add the control to sp. Which code segment should you write in the constructor of the MainWindow class?()
A.
B.
C.
D.
