How to: Add Data to a Screen
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
You can add groups of data to a screen. The data can come from any data source in a LightSwitch application.
At the top of the Screen Designer, click Add Data Item.
In the Add Data Item dialog box, select Query.
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.
In the Name box, type a name, and then click OK.
The query that you selected appears in the screen members list.
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 Silverlight Screen or How to: Add a Button.
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 Silverlight Screen by Using the Screen Designer or How to: Design a Screen by Using the Screen Designer.