Schultz’s PowerBuilder Notes

PFC DataWindow Row Management Service

The row management service provides for enhanced management of insertion and
deletion of datawindow rows, including an end-user interface to restore one or more
rows they deleted. It includes the following features:

  • Insert an empty row between two existing rows, or at the end of a datawindow
  • Delete specific, selected, or all rows
  • Restore one or more deleted rows
  • Require deletions to be confirmed by the end-user
  • Display a pre-built dialog allowing the user to restore one or more deleted rows

Of_DeleteAll()

Delete all rows in the datawindow. Return value is number of rows deleted.

Li_delete_cnt = dw_emplist.inv_rowmanager.of_DeleteAll( )

Of_DeleteRow()

Deletes the specified row in the DataWindow. After the delete, the function sets focus to the next row in the DataWindow at the first column with a nonzero tab order.

dwcontrol.instancename.of_DeleteRow ( rownumber )

How do I restore a deleted rows?

dw_emp.inv_rowmanager.of_SetRestoreRow(TRUE)

This will pop up a dialog box to undelete a row. Note, a New Row which is deleted can not be restored because the row is discarded and moved to the Delete buffer.

IF dw_emplist.inv_rowmanager.of_UnDelete( ) = -1 THEN
   MessageBox("Undelete", "Undelete error")
ELSE
   nv_app.of_GetFrame( ).SetMicroHelp("Undelete was successful")
END IF

Confirm on Delete

Specifies whether the service prompts the user to confirm deletion requests.

Inv_rowmanager.Of_SetConfirmOnDelete(False)

July 3, 2008 - Posted by rick130 | 3. PFC, Datawindow Services | , , , , , , | No Comments Yet

No comments yet.

Leave a comment