html a data app,How to: Filter Data in an HTML Client for a LightSwitch App

How to: Filter Data in an HTML Client for a LightSwitch App

11/19/2013

2 minutes to read

In this article

By filtering the data that appears in your HTML client for a Visual Studio LightSwitch application, you can help users identify the most relevant data for their tasks. For example, you can create or modify a Browse Data screen to help salespeople identify customers who ordered a particular product from your company in the last three months. To display a specific set of data on a screen, you create or customize a query that determines what data appears on a screen, and you associate the query with a new or existing screen.

Modifying the Query of an Existing Screen

You can repurpose an existing screen if you modify the query that defines the subset of data that the screen displays. For example, you might already have a screen that shows data based on the Select * from Customers query. By using the Query Designer, you can filter the data that appears in only that screen, even if that query defines the data set for other screens.

To filter the data in an existing screen

In the Screen Members List of the Screen Designer, choose the collection of data that you want to filter, and then choose the Edit Query link.

In the Query Designer, modify the query.

When you finish, choose the back arrow in the top-left corner of the Query Designer to return to the Screen Designer.

Filtering Data in a New Screen

If you already have a query in your LightSwitch solution, you can create a Browse Data screen that’s based on that query.

For information about how to add a query to your solution, see How to: Add, Remove, and Modify a Query.

To create a screen that shows filtered data

In Solution Explorer, open the shortcut menu for the HTML Client node, and then choose Add Screen.

The Add New Screen dialog box appears.

In the Select a screen template list, choose Browse Data Screen.

In the Screen Name text box, enter a name for the screen.

In the Screen Data list, choose a query, and then choose the OK button.

The screen will display only the data that meets the conditions that are the query specifies.

See Also

Other Resources

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值