Getting Started With LightSwitch 2011

This article describes how to load and edit data in an editable grid using LightSwitch 2011.

What is LightSwitch? Microsoft Visual Studio LightSwitch is the best way to create high-quality business applications for the Desktop and the cloud.

Getting Started: First of all you need to install LightSwitch2011. You can refer to this link:

After installing start Visual Studio and create a new project and select a LightSwitch template and click on the LightSwitch Application (Visual C#) and click "OK".


Image 1.


Image 2.

As you can see there are two links, one to create a new database table and the second to attach to an external data source. Let's click on "Attach to external Data Source".


Image 3.

Now click on "Database" and click "Next >".


Image 4.

Select the server name and select the database, I am using the NORTHWND database in this article. Click OK.


Image 5.

Select tables and click the "Finish" button.


Image 6.

This is the diagram layout as you can see. In this article you can add a relationship if you are using more than one table and you can write a query to access the database and you can add a screen.


Image 7.

Add a new screen now. Right-click on "Screens" and click on "Add New Screen".


Image 8.

Here you can select a screen template and you can edit the screen name and you must select screen data and click "OK".


Image 9.

In the screen designer you can delete any column and you can add a button.

Now let's run the application to see the output.


Image 10.

As you can see there are many features available; paging, Add new item, delete an existing item and export records.


Image 11.

Up Next
    Ebook Download
    View all
    View all