This article describes how to use the money data type in LightSwitch Visual Studio 2012.
This article describes how to use the money data type in LightSwitch Visual Studio 2012.The following is the procedure for how to use a money data type in LightSwitch.Step 1Open the LightSwitch Application in Visual Studio 2012 and go to the Solution Explorer.Right-click on the Data Source and choose "Add Table".The table appears in the table designer window. Insert the records in the following table.Step 2I have inserted a record named Salary in the table. For that I have used the Money data type. Click on the Salary field and go to the property window under the appearance section as shown below.Select the Symbol Mode from the property window. A drop down list will appear. The list consists of three symbols:1. No Currency Symbol2. Currency Symbol3. ISO Currency SymbolStep 3By default the currency symbol will be selected as shown in the figure below.In the Solution Explorer, right-click on the Screens and choose "Add Screen".The Add New Screen dialog box appears. Select the "Editable Grid Screen" from the Screen Template, under screen information, choose "Person" under screen data and provide some name to the Screen and click the "OK" button.The screen designer will appear as shown below.Step 4Press F5 to run the application. We get the Salary with a dollar symbol as shown.Step 5Once again go to the property window and select the "No Currency Symbol" from the Symbol Mode for the Salary field.Now press F5 to run the application. This time we get the Salary with no dollar symbol as shown.Step 6Now again go to the property window and select the "ISO Currency Symbol" from the Symbol Mode for the Salary field.Now press F5 to run the application. This time we get the Salary with ISO currency symbol as shown.
Printing in C# Made Easy