How to display the next record in the PB data window
In the PowerBuilder data window, there are the following ways to display the next record:
1 . Use the keyboard shortcut
2. Use the mouse to
3. Use DataSet object
<code class="powerbuilder">//获取当前记录索引 integer li_CurrentRowIndex = dw_data.GetRowIndex() //移动到下一条记录 li_CurrentRowIndex++ //将数据窗口移至新记录 dw_data.SetRowIndex(li_CurrentRowIndex)</code>
4. Use retrieval command
<code class="powerbuilder">//检索下一条记录 dw_data.RetrieveNext()</code>
5. Using event handling
<code class="powerbuilder">//在数据窗口的RowFocusChanged事件中处理下一条记录 dw_data.RowFocusChanged := Handle(hEvent) integer li_CurrentRowIndex li_CurrentRowIndex = dw_data.GetRowIndex() //如果是最后一条记录,则显示第一条记录 if li_CurrentRowIndex = dw_data.RowCount() dw_data.SetRowIndex(1) else //移动到下一条记录 li_CurrentRowIndex++ dw_data.SetRowIndex(li_CurrentRowIndex) end if return 0</code>
The above is the detailed content of How to display the next record in the PB data window. For more information, please follow other related articles on the PHP Chinese website!