Adding Simple Group Box in LightSwitch 2012

Here we will see how to add a simple GroupBox to a LightSwitch Application (Visual C#) in Visual Studio 2012.

The following is the procedure for adding a client screen.

Step 1

Open the Solution Explorer.

solution.jpg

Step 2

In the Solution Explorer, right-click on the server and choose "Add Table".

add.jpg

Step 3

The table appears.

tab.jpg

Step 4

In the Solution Explorer, right-click on "Screens" and choose "Add Screen".

src.jpg

Step 5

The Add New Screen dialog box appears. Select the "New Data Screen" from the Screen Template, under screen information, choose "None" under screen data and provide a name to the Screen and click the "OK" button.

new data.jpg

Step 6

The Screen Designer appears.

designer.jpg

Step 7

In the screen designer, click on the "Add Data Item" button in the menu bar.

add data item.jpg

Step 8

The Add Data Item dialog box appears. Choose the "Queries" radio button and select "Employees" form the grid, provide a name and click the "OK" button.

queries.jpg

Step 9

Once again click on the "Add Data Item" button and from the dialog box
choose the "Local Property" radio button and select "Employees" form the Type drop down list, provide a name and click the "OK" button.

local property.jpg

Step 10

In the Screen Designer click on the Add drop down list and select "Property1" from the list.

add property1.jpg

Step 11

Now click on the "Property1" option. A drop down list will appear and from that drop down list choose the "Auto Complete Box" control.

Auto box.jpg

Step 12

Go to the Property window for "Property1", choose "Employees" from the "Choices" dropdown list.

choices.jpg

Step 13

Add an Editable Data Grid Screen to add some data of the Employees.

editable grid.jpg

Step 14

Press F5 to run the application. Open the combo form; you will notice that the employee will be shown in the Auto Complete Box.

output.jpg

Up Next
    Ebook Download
    View all
    Learn
    View all