如何在 Lightswitch 的参数化查询中过滤 table 属性 以进行级联选择?

How do I filter a table property in a parameterized query in Lightswitch for cascading selections?

我有一个级联自动完成数据网格(顶部网格标记为 Trip),其中在第一个自动完成中选择了客户类型,它过滤了客户自动完成,过滤了地址位置。 我似乎无法显示 CityByLocationID 查询提供的位置 table 中的城市 属性。 这是我所在位置的示例。

我在旅行网格下方添加了查询,以表明他们正在选择正确的 table 记录。 我参考了这些教程进行研究 (https://dotnettim.wordpress.com/2011/03/20/lightswitch-nested-autocompletebox-for-data-entry/)

(http://blogs.msdn.com/b/bethmassi/archive/2012/01/12/creating-cascading-drop-down-lists-in-visual-studio-lightswitch.aspx)

但他们似乎没有解释在同一个 table 中从另一个查询绑定 属性。在这种情况下,城市 属性 来自所选位置记录。 正如您在底部看到的,CityOfSelectedLocationID returns 是正确的位置 ID 值,但我不知道如何将城市绑定到文本、标签字段或自动完成框。 我将参数化的 CityofLocationsId 绑定到 Trip table 的 LocationId,这为我提供了正确的地址信息(如底部所示),但在同一个查询中,我如何将城市绑定到一个字段? (即顶部网格中标记为 Trip 的城市字段)

(编辑) 上面的 CityOfLocaitonID 设置为 Id=Id(parameter) bind to Trip.SelectedItem.Location.Id 但是如果我添加 City = City (属性) 并绑定到 Locations(Entity) 属性 它仍然是 returns 地址值

我对此感到非常愚蠢,因为我知道这很容易被我忽略。我只是简单地添加了"Other Screen Data"并输入了Location.City!甚至不需要查询。enter image description here