Home Common Problem How to display the next record in the PB data window

How to display the next record in the PB data window

Apr 04, 2024 pm 07:54 PM

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

  • to move to the next record by pressing the down arrow key (↓).

2. Use the mouse to

  • #click a column or cell in the data window to select the record.
  • Hover over the record and right-click, then select Next Record.

3. Use DataSet object

1

2

3

4

5

6

7

8

//获取当前记录索引

integer li_CurrentRowIndex = dw_data.GetRowIndex()

 

//移动到下一条记录

li_CurrentRowIndex++

 

//将数据窗口移至新记录

dw_data.SetRowIndex(li_CurrentRowIndex)

Copy after login

4. Use retrieval command

1

2

//检索下一条记录

dw_data.RetrieveNext()

Copy after login

5. Using event handling

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

//在数据窗口的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

Copy after login

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1661
14
PHP Tutorial
1261
29
C# Tutorial
1234
24