This documentation is archived and is not being maintained.

How to: Add Data to a Screen

You can add groups of data to a screen. The data can come from any data source in a LightSwitch application.

To add data to a screen

  1. At the top of the Screen Designer, click Add Data Item.

  2. In the Add Data Item dialog box, select Query.

  3. In the list of queries, select a query that returns the data that you want. Queries that end with the label (All) return a collection of data. Queries that end with the label (Single) return an individual item of data.

  4. In the Name box, type a name, and then click OK.

    The query that you selected appears in the screen members list.

  5. From the Screen Members List, drag the query onto the desired area of the Screen Content Tree.

    If the query returns a collection of data, a group appears in the Screen Content Tree. This group contains the fields of data returned by the query.

    If the query returns an individual item of data, a control that is appropriate for displaying an individual item of data, such as a text box, appears in the Screen Content Tree.

Add commands to the group. For more information, see How to: Add a Custom Command to a Screen.

Customize how the data in the group is filtered. For more information, see How to: Filter Data on a Screen.

Move groups to other positions on the screen or change the layout of the data in the group. For more information, see How to: Design a Screen by Using the Screen Designer.

Show: