Performing Various Operations on Table in LightSwitch 2012

This article shows how to perform various operations on a table using LightSwitch Visual Studio 2012.

Procedure showing various operations that can be performed on a table.

Step 1

Open the LightSwitch Application in Visual Studio 2012 and go to the Solution Explorer.

sol exp.jpg

Right-click on "Data Source" and choose "Add Table".

add table.jpg

The table appears in the table designer window.

empty table.jpg

Provide some Name and add some data to the table.

Employee table.jpg

Step 2

Insert a New Property in a Table.

Right-click on a specific row of a table and choose "Insert New Property" to add a row.

Insert new prop.jpg

A specific row is inserted into the Table "Property1" as shown in the figure.

property1.jpg

Provide some name (Gender) in place of Property1.

prop added.jpg

Step 3

Delete a row from the Table.

To delete a row,
right-click on the specific row of a table and choose "Delete".

DELETE.jpg

That specific row will be deleted.

Employee table.jpg

Step 4

Moving up a specific row in the Table.

To move up a row, right-click on a specific row of a table and choose "Move up".

move up.jpg

The result is that specific row will move up.

row move up.jpg

Step 5

Similarly you can move a specific row down in the Table.

In order to move a row down, right-click on the specific row of a table and choose "Move down".

move down.jpg

The result is that the specific row will move down.

row move down.jpg

Step 6

You can also establish the relationship between two tables simply by right-clicking on the table and choosing "Add Relationship".

add relationship.jpg


Similar Articles