This article shows how to add a new record using an Editable Datagrid Screen in a LightSwitch application using Visual Studio 2012.
I am using the table I created in my previous article (http://www.c-sharpcorner.com/UploadFile/18ddf7/customizing-search-screen-in-lightswitch-2012/),
The following is the procedure for adding a new record in the Editable DataGrid Screen.
Step 1
Open the Table (EmpTable) from the Solution Explorer.
Step 2
Click on the Screen Button from the Menu bar to add the screen. 
Step 3
Since we are creating an Editable DataGrid Screen, choose the "Editable DataGrid Screen" template. Under Screen Information we provide the Screen Name and select any Screen Data and then click OK.
Step 4
Once you click the "OK" button, the screen designer appears inside the Visual Studio IDE.
Step 5
Press F5 to run the application. 
Step 6
Click on the Tasks option in the menu and choose the Editable Emp Tables Grid.
Step 7
This will open the "Editable Emp Tables Grid" screen as a new Tab. In the same screen you will see a "Save" and "Refresh" button, a "Search Panel" and a button called "Export to Excel". It also consists of "Add", "Edit" and "Delete" buttons.

Add a New Record
There are two ways to add a record.
Step 8
The first way is to click on an empty row. That it will create a new row in the DataGrid.
Step 9
Enter the record in the particular row and click on the Save button.
Step 10
The second way is to click on the Add (+) Button provided in the screen as in the following:
Step 11
The "Add New Emp Table" child window appears. Enter the records in the window and click the "OK" button. 
You will see that the record has been inserted successfully in the Editable Emp Tables Grid.
I will explain "How to Edit and Delete a record from an Editable Emp Tables Grid" in my future article.

Join the conversation! Your thoughts help the community grow.