Prologue:In my previous article, we saw how to create and use the Details Screen. In this article we shall discuss how to create and use an Editable Grid Screen in a LightSwitch application.Preparing the Solution:Create a LightSwitch Desktop application with the name "DesigningScreensInLSBeta2" as shown in the following figure. Follow the [No: #] to create the Solution.The Entity Designer: Let us create a table. This is a new screen of Beta 2 which is not available in Beta 1. Select the rounded option to create a new table.After clicking on the "Create new table" option the following Entity Designer will be displayed. To change the table name simply click on the header of the Entity Designer and give the new name. In our sample application we have given the name Student.When you are creating a table [Entity], the field Id is the default one. At run time sometimes we don't need the Id to be displayed.To make the visibility of the Id false, select the Id and select the properties for the Id field. Just uncheck the option "Display by Default". It will hide the Id from the running screen.Creating the Search Data Screen:There are two ways to create a screen. One is by selecting the Screen... button on the Entity Designer screen top. Another way is right-click on the Screens section in the Solution Explorer.Adding Details Screen:In this article we will mainly focus on the Details Data Screen. To create the Editable Grid Screen, select Editable Grid Screen from the screen template in the left side panel [No: 1].Give a suitable name for the screen we are creating. In this application we have given the name EditableStudentGrid [No: 2].Quick Note:
C# Corner. All contents are copyright of their authors.