This article describes how to change the control type of a specific record in LightSwitch Visual Studio 2012.
Here we will see how to change the control type of a specific record in LightSwitch Visual Studio 2012.Procedure showing how to change the control type of specific fieldStep 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 also inserted a record named IsPresent in the table that is of Boolean type. Step 3Now once again go to the Solution Explorer, right-click on "Screens" and choose "Add Screen".The Add New Screen dialog box appears. Select "Editable Grid Screen" from the Screen Templates, under screen information, choose "Student" under the screen data and provide a name to the Screen and click the "OK" button.The Screen Designer appears. Under the "Data Grid Row" | "Student" , there is an IsPresent field whose control type is Checkbox by default.Step 4Press F5 to run the application. We will see that the checkbox will appear under the "IsPresent" column as shown belowStep 5Stop debugging the application.In the Screen Designer, select the "IsPresent" field under the "Data Grid Row" | "Student" and then go to the property window and change the control type from "Checkbox" to "TextBox" as shown below.There is another way by which we can change the control type, which is to open the Screen Designer, select the "IsPresent" field under the "Data Grid Row" | "Student", a drop down list will appear from which we can easily select the control type as shown below.Once again press F5 to run the application. We will see that the TextBox will appear under the "IsPresent" column as shown below.
Printing in C# Made Easy