更改数据后,按父字段排序不起作用. [英] Sorting by a parent field not working after data change.

查看:78
本文介绍了更改数据后,按父字段排序不起作用.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:我有一个计划列表详细信息屏幕,该列表是按RankSortOrder排序的员工,该排名是AgencyRanks实体中的帮助者字段.此帮助字段的目的是要能够按员工等级对员工列表进行排序.

Problem: I have a schedule list details screen with the list being employees sorted by RankSortOrder which is a helper field in the AgencyRanks entity. The purpose of this helper field was to be abile to sort employee lists by the rank of the employee.

这是我的Employee表的查找表,其中存储了排名.

It is a look up table for my Employee table which stores the Rank.

我创建了一个全局查询按活动状态过滤并按Asc中的EmployeeRank.RankSortOrder排序:

I created a global query  filtering by Active status and sorting by EmployeeRank.RankSortOrder in Asc:

在我重新分配"之前,该方法一直很好.雇员到我的ManageEmployees屏幕中的其他位置,例如将我的工作分配(组合框中的值)从"Charlie Zone"更改为到回声区".现在,当我通过 回声区" 天"我出现在列表中,但排序顺序仅对已编辑的记录不起作用,其余的都已正确排序.

This worked fine until I "reassigned" an employee to a different position in my ManageEmployeesScreen such as changing my assignment (the value in the combo box) from "Charlie Zone" to "Echo Zone".. Now when I filter by "Echo Zone" "Day" I appear in the list but the sort order doesn't work only for the edited record, the rest are sorted properly.

我以为过滤器可能搞砸了,所以我编辑了屏幕查询并添加了相同的排序顺序.

I thought the filters may be messing it up so I edited the screen query adding the same sort order.

这也没有纠正它.关于为何不对已编辑字段进行排序的任何想法? (我刷新,关闭,重新启动甚至关闭了VS,以为可能没有保存更改,但困境仍然存在.

This did not correct it either. Any ideas on why it is not sorting edited fields? (I have refreshed, closed, restarted and even shut down VS thinking changes may not have been saved but the dilemma persist.

感谢您的帮助.

JL

推荐答案

排序是在执行查询时在服务器上完成的.在执行排序时不包含未保存的值.
The sort is doneon the server when the query is executed.  The sort is performed by the underlying data store which doesn't contain the unsaved values at the time the sort is performed.


这篇关于更改数据后,按父字段排序不起作用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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