close

Refresh (刷新)

This method basically refreshes the data displayed in the form controls with whatever is stored in the form cache for that particular datasource record. Calling refresh() method will NOT reread the record from the database. So if changes happened to the record in another process, these will not be shown after executing refresh().

此方法基本上使用該特定數據源記錄的窗體緩存中存儲的內容刷新窗體控件中顯示的數據。調用refresh()方法不會從數據庫中重新讀取記錄。因此,如果另一個進程中的記錄發生了更改,則在執行refresh()之後將不會顯示這些更改。

refreshEx

This method should be used sparingly, in cases where multiple rows from the grid are updated, resulting in changes in their display Options, as an example. So you should avoid using it as a replacement for refresh(), since they actually have completely different implementations in the kernel.

例如,在更新網格中的多行導致其顯示選項發生更改的情況下,應謹慎使用此方法。因此,您應該避免使用它代替refresh(),因為它們實際上在內核中具有完全不同的實現。

Reread (重讀)

Calling reread() will query the database and re-read the current record contents into the datasource form cache. This will not display the changes on the form until a redraw of the grid contents happens

調用reread()將查詢數據庫並將當前記錄的內容重新讀取到數據源表單緩存中。在重新繪製網格內容之前,這不會在表單上顯示更改

Research (研究)

Calling research() will rerun the existing form query against the database, therefore updating the list with new/removed records as well as updating all existing rows. This will honor any existing filters and sorting on the form, that were set by the user.

調用research()將針對數據庫重新運行現有的表單查詢,因此將使用新的/已刪除的記錄來更新列表以及更新所有現有的行。這將重置用戶設置的表單上所有現有的過濾器和排序。

Research (true)

The research method starting with AX 2009 accepts an optional boolean argument_retainPosition. If you call research(true), the cursor position in the grid will be preserved after the data has been refreshed. This is an extremely useful addition, which solves most of the problems with cursor positioning (findRecord method is the alternative, but this method is very slow).
 
從AX 2009開始的研究方法接受可選的boolean arguments_retainPosition。 如果調用research(true),則刷新數據後將保留網格中的光標位置。 這是一個非常有用的補充,它解決了光標定位的大多數問題(findRecord方法是替代方法,但是此方法非常慢)。
 

ExecuteQuery

Calling executeQuery() will also rerun the query and update/add/delete the rows in the grid. The difference in behavior from research is described below.
ExecuteQuery should be used if you have modified the query in your code and need to refresh the form to display the data based on the updated query.

調用executeQuery()還將重新運行查詢並更新/添加/刪除網格中的行。行為與研究之間的差異描述如下。
如果您已經在代碼中修改了查詢,並且需要刷新表單以根據更新的查詢顯示數據,則應使用ExecuteQuery。

arrow
arrow

    lionlionchopper 發表在 痞客邦 留言(0) 人氣()