Part 5/11: Rapport with List and Details Screen in LightSwitch

Posted by in LightSwitch category on for Beginner level | Points: 250 | Views : 14510 red flag

This is the fifth part of the 11 series LightSwitch tutorial. In this part we will learn about how to work with the List and Detail screen for viewing the records both as list and details.

Table of Content

  1. Introduction
  2. Aim of the article
  3. Functionalities of the Editable Grid Screen
  4. Steps to create List and Detail Screen
  5. Adding Popups
  6. Conclusion


Rapid business application development is a need of today’s business and keeping that in focus software stewards wants to build the 3 tire applications at a lightning speed where there will be less code, less time will be spent on designing the UI screens , the BAL layer and DAL layer. By keeping all these into focus, on 26th July, 2011, Microsoft has released their new product – LightSwitch.

It is the simplest way for developers of all skill levels to develop business applications for the desktop as well as for cloud. This is the fifth part of the series of 12 LightSwitch tutorials where we will look into how to work with List and Detail screen.

You can read the other parts of the LightSwitch tutorial as under

  1. Part 1: Introduction to Light Switch
  2. Part 2: Rapport with New Data Screen
  3. Part 3: Rapport with Search Data Screen
  4. Part 4: Rapport with Editable Grid Screen
  5. Part 5: Rapport with List and Details Screen
  6. Part 6: Rapport with Details Screen
  7. Part 7: Rapport with External Data Source – Database
  8. Part 8: Rapport with External Data Source – WCF RIA Service
  9. Part 9:Using a custom control in LightSwitch
  10. Part 10: Publish LightSwitch Application as Desktop application and host in local system
  11. Part 11: Publish LightSwitch Application as Web application


The article assumes that, we have LightSwitch 2011 installed in our system

Functionalities of the List and Detail Screen

This screen provides a lot of functionalities which are listed as under

  1. View Records boty as List and details
  2. Search a record
  3. Sorting the records for a particular field in the grid
  4. Navigating among the records using the inbuilt pagination
  5. Export the records to Excel

Out of these various functionalities, we have covered #2 to #5 in the Search Data Screen illustration and henceforth will not be repeated here

Steps to create List and Detail Screen

From the Screen Template, choose the "List and Detail screen". Enter a proper Screen Name and choose tblEmployee from the Screen Data.

Run the application.Initially it will appear as under

As can be figured out that the list of employees are listed on the left while the details on the right.

Even we can filter out the record by our choice

Adding Popups

We can add Popup windows to our screen. Let us see how.First let us go the screen we have designed and choose "Selected Item" from the Rows Layout

We can find that all the items will be listed

Now we need to choose those Fields that will appear in the popup and have to delete the rest.For doing so,let us right click on the Field and select the Delete option

In our case, we will keep the following fields

Next, change the Rows Layout to Modal window

So, the final appearence will be as under

Let us run the application now

We can find that a button has appeared in the bottom by the name "Selected Item". Clicking that, opens up the popup window


So in this part we have seen how to work with the List and Detail screen for viewing the records both as list and details.We have also seen as how to create a popup window for viewing records as well as figure out the other functionalities that this screen is providing us.In the next article we will look into the Details Screen.

Thanks for reading the article.Happy lightning with LightSwitch.

Page copy protected against web site content infringement by Copyscape

About the Author

Full Name: Niladri Biswas
Member Level: Platinum
Member Status: Member
Member Since: 10/25/2010 11:04:24 AM
Country: India
Best Regards, Niladri Biswas
Technical Lead at HCL Technologies

Login to vote for this post.

Comments or Responses

Login to post response

Comment using Facebook(Author doesn't get notification)