This article describes how to hide a field in LightSwitch using Visual Studio 2012. Here in this article I am setting the visibility of an ID field to false.
The following is the procedure for displaying a field.
Step 1
Open the Solution Explorer.
![sol explo.jpg]()
Step 2
In the Solution Explorer, right-click on the data source and choose "Add Table".
![add table.jpg]()
Step 3
The Table appears.When we are creating a table sometimes we require the field and sometimes not. Here the field is visible by default.
![table.jpg]()
Step 4
In the Solution Explorer, right-click on the Screens and choose "Add Screen".
![add src.jpg]()
Step 5
Select "Add New Screen" from the Screen Template. Under Screen Information we provide the Screen Name and Screen Data and then click "OK".
![src.jpg]()
Step 6
The Screen Designer appears.
![application designer.jpg]()
Step 7
Press F5 to run the application.
![with id.jpg]()
Now the following is the procedure for hiding a field.
Step 1
In the Step 3 after creating the table, select the ID field from the table and then go to the property window and unmark the checkbox "Display By Default".
![not displayed.jpg]()
Step 2
It will hide the ID from the running application.
![output without id.jpg]()