Adding a Choice List in LightSwitch 2012

Adding a ChoiceList In LightSwitch 2012

A Choice List represents data to be limited to a small amount of values. For example if there is a field for which Male and Female are the fixed set of values.

Here we will see how to use a Choice list in a Table in LightSwitch using Visual Studio 2012.

The following is the procedure for using a Choice List in LightSwitch.

Step 1

Open the Solution Explorer.

sol explo.jpg

Step 2

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

add tab.jpg

Step 3

The Table appears in the table designer.


Adding a Choice List

Step 1

Select the field in the table and go to the property window and click on the "Choice List" link.

prop win.jpg

Step 2

The Choice List dialog box appears on the screen. Define the various choices and click the "OK" button.

value choice.jpg

Adding a Screen

Step 1

Right-click on "Screens" and choose "Add Screen".

add src.jpg

Step 2

The Add New Screen dialog box appears. From the screen template choose "New Data Screen", select the Screen Name and Select the Screen Data and click "OK".

new data src.jpg

Step 3

Press F5 to run the application.


Up Next
    Ebook Download
    View all
    View all