设置下拉菜单的自定义数据源 [英] Set custom data source for drop down

查看:134
本文介绍了设置下拉菜单的自定义数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的情况:我有一个查询,OrganizationsPerPerson,带有可选参数@PersonId.我已将此查询作为其他数据项添加到创建新屏幕",并想使用它 作为自动完成框的数据源.  在屏幕上,我希望用户首先选择一个人员,然后使用该选择作为触发来过滤基于查询的自动完成控件中的OrganizationsPerPerson-仅显示组织 与所选人员相关的人.    

Here is my situation: I have a query, OrganizationsPerPerson,  with an optional parameter @PersonId. I have added this query as an additional Data Item to a Create New Screen, and would like to use it as the data source for an Autocomplete box.  On the screen I would like the user to select a Person first and then use that selection as a trigger to filter the OrganizationsPerPerson in my query based Autocomplete control - showing only Organizations that the selected Person is related to.   

问题1:当我尝试将查询添加到屏幕时,只允许我使用DataGrid或List.自动完成功能不可用.那是由于查询本身吗? (它基于db View).是自动完成吗 框仅限于某些数据源类型?

Question 1: When I try to add the query to the screen it only lets me use a DataGrid or List. The Autocomplete is not available. Is that due to the query itself? (Its based on a db View ).  Are Autocomplete boxes limited to certain datasource types? 

问题2:假设我已经弄清了自动完成功能,如何提供@PersonId参数值?我可以在先前选择的人员自动完成"上使用一个事件来提供@PersonId参数.  任何人 有这个例子吗?

Question 2: Assuming I get the AutoComplete figured out, how do I supply the @PersonId parameter value? Can I use an event on the previously selected Person Autocomplete to feed the @PersonId parameter.  Anyone have any examples of this ? 


推荐答案

您知道了吗?

我在暗中刺刺以很好地解释了这一点,但我认为回答一个问题的答案是:您是否设置了人际关系?

I'm stabbing in the dark as to explain this well, but I think the answer to question one this question: Do you have your relationships set?

对于第二个问题,答案可能是在查询中添加一个参数,该参数链接到屏幕上的表列或链接到表字段.

As for question two, the answer will probably be in adding a parameter to your query that links back to a screen a table column or links back to a table field.

这些主题在Beth的视频中得到了很好的报道.

These subjects are covered very well in Beth's videos.

我可以告诉您,一旦您习惯了LightSwitch数据的工作原理,就很容易做想做的事.

I can tell you that doing what you want to do is very easy to do once you get used to how LightSwitch data works.

直到开始使用它时,我才得到的是查询参数绑定.您可以通过从表名开始然后处理table.parenttable.parenttableid格式中的关系来绑定到屏幕中的任何数据,

The thing that I didn't get until I started working with it is that the query parameter binding.  You can bind to any data in the screen by starting with the table name then working through the relationships in the table.parenttable.parenttableid format,


这篇关于设置下拉菜单的自定义数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆