Chapter 7

Working with Master-Detail Data Screens

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Understanding detail table relationships
  • Grasping the essence of master-detail screens
  • Understanding the role of data and layout items in master-detail screens
  • Creating and using queries to filter and sort data
  • Building master-detail screens manually from simple screens

Most data-centric applications work with more than one table, and those tables are related to each other. It is very common for a simple application screen to display data coming from multiple, and related, tables. For example, when you display order information, generally that screen contains an Order record (order date, shipping address, delivery method, and so on) and one or more related OrderDetail records (product, quantity, unit price, tax percentage, full price, and so on).

This kind of screen is called a master-detail screen. In this chapter, you will learn how you can manage master-detail screens with Visual Studio LightSwitch. Using the ProjectTrek application, you will create screens using the Project, ProjectTask, AdditionalCost, and CostItem entities, whose relationships are depicted in Figure 7-1.

FIGURE 7-1: The entity-relationship diagram of ProjectTrek

image

The entities stored in this already existing ConsulArtCRM database are marked with orange background and rounded corners. The lookup tables (that is, simple ...

Get Beginning Visual Studio® LightSwitch Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.