group 6 Flashcards

1
Q

Windows Forms allows you to bind easily to nearly any structure that contains data

A

DATA BINDING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

With data binding, you do not need to explicitly write the code that..

A

instantiates a connection and creates a dataset

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

allows you to bind a control to a single data element

A

Simple data binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The most common use of simple data binding involves binding a single data element, such as

A

the value of a column in a table, to a control on a form

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

You use this type of data binding for controls that show only one value.

A

simple data binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Uses of simple data binding include binding ___. Consider a scenario where a Windows Forms form needs to be created to display employee details in the following way.

A

data to text boxes and labels

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

STEPS IN CONNECTING

A
  1. Press F4 to open the properties window.
  2. Select the first TextBox to display its properties window.
  3. Expand the (DataBindings) property.
  4. Select the text property to enable the drop-down list. Click the drop-down list.
  5. Add a project data source in the
    drop-down list
  6. Create a connection with the AdventureWorks database and select the HumanResources.employee table.
  7. Select the first TextBox. Expand “Other data source” —> “Project data source” –> “AdventureWorksdataset” –> “Employee” –> “EmloyeeId”.
  8. Select the second TextBox. Expand the DataBinding property then select “Text” —> “Employee Binding source” then select column(National ID) from the list.
  9. Similarly, bind TextBox3 and TextBox4 with the column contactid and Login ID.
  10. Press F5. If everything goes well, you will see the following output.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

allows you to bind more than one data element to control

A

Complex data binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Using the column example, ___ involves binding more than one column or row from the underlying record source

A

complex data binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Controls that support ___ include data grid controls, combo boxes, and list boxes.

A

complex data binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Let’s see complex data binding with a DataGridView.

A
  1. Drag and drop a DataGridView from the Toolbox under the Data tab.
  2. Click on the DataGridView task pop-up menu as shown in the following figure
  3. Select the Choose Data Source drop-down list and then select the Add Project Data Source from the DataGridView task pop-up menu as shown in the following figure
  4. In the database configuration wizard select the database and click on “Next” as shown in the following figure
  5. After clicking on the Next button you will get the following output
  6. Click on “New Connection” to create a new connection to your data source.
  7. To add a connection
    Provide the server name
    If your server is not using Windows authentication then select “Use SQL Server authentication”.
    Provide the username and password.
    Provide the database name AdventureWorks from the Select or enter a database name drop-down list.
    Click on the Test Connection Button. If everything goes well you will see a message box saying that the connection succeeded as shown in the following figure.
  8. Click the OK button.
  9. Click the OK button on the Add Connection dialog box.
  10. Select Yes, Include sensitive data in the connection string, and click the “Next” button in the DataSource configuration wizard. You will get a page as displayed in the following figure.
  11. Ensure that the Yes, save the connection as the check box is selected and the AdventureWorksConnection string appears in the TextBox.
  12. Note that We will see what the use of saving the connection string in the App.
  13. Click the “Next” button. The Choose Your Database Objects page is displayed as shown in the following figure.
  14. Expand the table node and select the HumanResources.The employee table is shown in the following figure
  15. Click the “Finish” button. The form is displayed, as shown in the following figure. Click the “Finish”
    button. The form is displayed, as shown in the following figure.
  16. Press F5 to execute the application. You will get the following output.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

is the ability to bind some elements of a data source with the controls of Windows Forms to form without writing code

A

Data Binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

two types of data binding

A

Simple Data binding
Complex data binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

the process of binding a control such as a TextBox or a label

A

Simple Data binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

the process of binding a control such as ComboBox, DataGridView, or ListBox

A

Complex data binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly